How do babies learn to talk?

By listening. Infant learn by listening and imitating behavior, that is why so important to speak to them in clear concise words. Repetition is also part of the learning process.
I agree w' Dr. De La Rosa. Infants look, listen and imitate both the sounds and facial expressions they observe. Infants can also learn multiple languages and differentiate between them. This ability seems to disappear later in life, which is why exposure to languages during early childhood is recommended and taught at earlier ages in schools now.