Ask yourself how a baby learns his/her mother tongue – it is a matter of being exposed to it daily. Children process the things their parents say for future speech development. When they start speaking, they "feel" rather than follow language rules.
Research has shown that in the first years of life, children can “learn” (or acquire) different languages with very little effort. In fact, with the right amount of exposure to the foreign language, they can acquire a second language almost in a mother-tongue-way, faster than an adult by far.
The ability to distinguish the different sounds of a foreign language is at its best during a child’s first years of life because, at this time, the child’s understanding is not yet influenced by the sounds of his or her mother-tongue, nor by reading and writing. Children repeat sounds and words in the foreign language imitating the stimulus they hear. However, as we grow up, we unconsciously select the sounds related to our mother tongue.