Hoplites were citizen-soldiers who were expected to fight for their individual polis. All male citizens were considered potential soldiers and were expected to fight when called upon. They were also expected to furnish their own weapons and armor.
The relationship with the polis is somewhat limited, other than the fact that each hoplite was a citizen of the polis; mercenaries were used on occasion, but they were not considered hoplites. Originally, hoplite forces came to be because of warfare between the individual city states; however with time and the threat from Persia, the emphasis shifted from fighting other poleis to fighting enemies of the Greeks at large.