How did the first astronomers define what a planet is?

What is the origin of the term "planet" and how did astronomers first define the term?