An idealist focuses on things as they should be, whereas a realist focuses on things as they are. While an idealist is not satisfied until he sees reality achieve its optimal state, a realist is content with the most approximate results. These two philosophies are informed by distinct metaphysics that originated in ancient Greece.
Idealism is a focus on the ideal, that which is perfect and uncorrupted. For the idealist, ideas are the true reality. This way of thinking in large part comes from Plato, who conceived of a special plane of existence in which every idea has a pure and perfect form. For Plato, true wisdom and enlightenment comes when one consciously experiences these ideals. Thus, idealists are unsatisfied with the imperfections of the mundane. They are generally confident in their ability to implement their conception of "the good" despite considerable practical obstructions.
Realists look at things the way they are. Unlike idealists, they are more prone to accept obstacles and settle for "good enough." Aristotle, a student of Plato, espoused an early form of realism. He rejected the notion of a plane of perfect forms. Instead of conceiving of the best possible social order, he studied existing systems of government and analyzed their strengths and weaknesses to determine what works in reality.