This is a great question for a curious kid. But it is such a hard question that in 1866 the Linguistic Society of Paris got sick of people writing about it with nothing more than guesses, and banned articles on the topic.
Fortunately, scientific progress in the past 150 years has changed this situation. We don’t have all the answers, but we can make better guesses than people could in 1866.
In the beginning
The first thing to think about is that at one time there was no spoken language.
We’re confident language as we know it did not exist around 6 million years ago because our ancestors then were also the ancestors of chimpanzees, who do not have language.
And our best guess (from this article) is that we had language at least 500,000 years ago, because it seems Neanderthals may have had language like ours, and our last common ancestor with them was half a million years before today.
So what happened between no-language and language?
Because change is generally gradual - an idea that scientists call the “principle of uniformity” - many people who study language origins believe there was an intermediary stage, called “proto-language”. It’s hard to find out what happened in language so long ago, because words don’t have bones, and so don’t leave fossils.
One of the ways we work out what proto-language might have been like is by looking at languages that have developed from nothing in recent times. One of the best examples is Nicaraguan Sign Language (LSN).
The children who created their own language
Before 1977, deaf children in Nicaragua lived with their families and were often very isolated, as there were no special schools for them. Generally, they created their own gestures for communicating with their families. But by 1983, more than 400 of them were attending a school in the capital city. The students there really wanted to speak to each other, but did not have a common language.
They started to create one together, transforming their separate home signing systems into the beginnings of a new language. Younger children learned from older children, and changed the hand gestures to make them more fluent.
So before spoken language might have got started, just like before LSN got started, we probably communicated in a proto-language with a small range of sounds and signs local to our own group.
Through repeated interaction inside our small community groups and between those groups over thousands of years, better ways of communicating with sound arose, either by chance or by people being creative.
We know from experiments (like this one) that people like to adopt new ways of representing things if they seem better, or more efficient.
Over many thousands of years, there would have been lots of opportunities to create new ways of talking, try them out, adapt them, keep the good ones, and steal better ones from your neighbours.
In the space of a few short years, deaf Nicaraguan school children created their own language. Over hundreds of thousands of years, the same process created the thousands of spoken languages that exist in the world today.