The Greeks called everyone who didn't speak Greek a barbarian (barbaros). They said that people speaking other languages sounded like they were just going "bar, bar, bar, bar..." and that is why they called those people barbarians.
Don't let this fool you into thinking that these "barbarians" were all living in the Stone Age. The Greeks called Persians, Romans, Phoenicians, Scythians, Egyptians - all barbarians. Many of these people had more technology than the Greeks. It just meant that they did not speak Greek.
The Greeks believed that Greek people (or at least Greek men) were more rational than these barbarians. The Greeks thought that barbarians were ruled by their emotions instead of by reason.
To find out more about ancient Greek ideas about "barbarians" check out these books from Amazon or from your local library:
Greeks and Barbarians, by Thomas Harrison (2001).
Greeks, Romans and Barbarians: Spheres of Interaction, by Barry Cunliffe.