Originally it referred to the “best” people who are linked to those with the highest education and standing in society (this is in comparisson to as compared to a monarchy). Gradually the meaning of aristocrat changed to relate to the ruling class and by end of the eighteenth century the opposite was democracy.
The term came into existence when in Athens some young citizens led the army being in the front line and taking their swords up. Since, in those times the bravery in the warfare was the only criterion to judge people, they were conferred on the title of the 'Aristocrats'.
In modern times the term aristocracy is somewhat an offensive term as it advocates the rule of the best, which is in contrast to democracy, which says that rule should e of everyone and there should be no discrimination among people.