One prominent theory about the development of the first languages relates to tools and resources. Teaching another person how to use tools requires a certain, agreed-upon vocabulary, as does the process of sharing and protecting resources like food and shelter. Small groups of people living in close quarters would therefore need to develop a way to understand each other, so they came up with a vocabulary and syntax that meant something to them.
A group of people across the world from them, though, would probably need an entirely different vocabulary of words, so the languages would have developed differently in isolation. Think of the oft-quoted (but erroneous) example that Eskimos have 100 different words for snow because they have so much of it. While that common statement is wrong, there are cultures that have far more words for rice and camels than, say, English does.
So these small groups of people, living in isolation from one another, agreed on names for their tools and food, and they came up with ways to describe how resources would be divided. But when another group migrated into the area, or came with different resources to trade, the groups had to find a way to merge their different lexicons and communicate. Over time, that's how languages have developed, and as some groups conquered others, that's how some languages died out.