Linguists refer to this as the ''assimilation phase'' of language learning, when the ear is sensitive to new sounds. This phenomenon allows the child to absorb the phonemes, vocabulary and melody of a language, as well as its grammatical structures. Older children lose the ability to assimilate a language naturally and pass into an ''analytic phase'' of language learning. This is the process by which most adults acquire a new language, through hard work and memorization. As with any sort of learning, some children are quicker than others.
Personalities play a part as well.
Some children will accept different languages and others won't. Many children will not accept another language if English is the family mother tongue. Language is also a byproduct of emotional attachment. The small child responds to language or languages of their caregivers. They accept one language from one person, another from someone else, if it is done in a consistent way.