There were several Spartan social classes, including the Spartiate or Homoioi, Perioeci and Helots. There were additional classes outside those that lived or were born in Sparta, such as the Trophimoi, who were foster sons allowed to come and study in Sparta.
Spartiates, or Homoioi as they were called by the Greeks, were citizens of the city that were born there and could trace their lines family lines to the original inhabitants of the city. Male Spartiates also had to attend agoge, state-controlled education, starting at the age of seven. Perioeci were like middle class citizens, which included the farmers and artisans of Sparta. Helots were the slave class, but if a Spartan family adopted a helot child and sponsored them to study, they could become trophimoi.