how does our brain know how to provide the right instructions to pronounce words? Children learn to speak by hearing others and then trying to pronounce these words.
What I don't understand is: how does their brain know the right instructions to give to the tongue, lips and the vocal cords to produce a sound that is similar to what they hear? How does the brain of child who is trying to pronounce letters for the first time know how to move the tongue to produce 'N' sound, for example?
Why do we find it hard to pronounce foreign letters that doesn't exist in our first language as adults? Does our brain lose the ability to figure out how to pronounce new letters?
Children experiment and practice. They produce sounds and then listen to their own sounds as well as those produced by others around them.
Part of this experiment and practice is the stage of language development referred to as babbling. During babbling, infants work towards producing sounds specific to the language they've been exposed to and gradually develop more and more sophisticated sounds that still (mostly) lack meaning. Infants select and repeat those sounds they make that replicate the language they hear from others.
Periods during development when certain skills are learned preferentially are called critical periods. There are early critical periods in language development after which it is more difficult (but not impossible!) to learn to pronounce new syllables because the practice/experimentation phase is passed.

de Boysson-Bardies, B., &amp; Vihman, M. M. (1991). Adaptation to language: Evidence from babbling and first words in four languages. Language, 67(2), 297-319.
Hallé, P. A., De Boysson-Bardies, B., &amp; Vihman, M. M. (1991). Beginnings of prosodic organization: Intonation and duration patterns of disyllables produced by Japanese and French infants. Language and speech, 34(4), 299-318.
Oller, D. K., Wieman, L. A., Doyle, W. J., &amp; Ross, C. (1976). Infant babbling and speech. Journal of child Language, 3(1), 1-11.