How Children develop language rapidly is a big mystery, but we have theories. I believe there are two that play a major role in the development of language. Modeling and Reinforcement, one and the other one is Functionalism.
Modeling and Reinforcement, it explains that there has to be a structure to copy from. In other words, children see adults making sounds and they try to copy that sound. Also, they can relate certain word to an item or person. For example, children know at a young stage who is their mom. Usually children before they get to their first year, they would call out for their mother. Of course, they will not use the exact word of mother or mom, but they would try to imitate a sound similar to it and see a result. it’s common for a child to use a word like mah or mah-mah and see the parental figure acknowledge it as if the word was mother.
Also, reinforcement would help children learn the language. I know a common thing child do at an early stage is play like if they were on the phone. Once a child has the toy phone or any object that can simulate to be a phone and put it next to the ear, the reaction from parents would be to say hello. Once the child makes the connection and tries to put the phone next to his ear, he would try to say the word hello. Parents would have a positive reinforcement on that action and kids would keep trying to say the word hello and relate it to being on the phone. This example shows the willing of kids trying to say something to get a cheerful and positive effect from their parents.