In philosophy, Idealism is any theory positing the primacy of spirit or mind over matter. It includes claiming that thought has some crucial role in making the world the way it is--that thought and the world are made for one another, or that they make one another. (For example, Immanuel Kant held that the mind forces the world we perceive to take the shape of space-and-time; Georg Hegel thought that history must be rational in something significantly like the way science is.) Finally, "idealism" can denote the belief that abstract or mental entities have some sort of reality "independent" of the world. (Some philosophers think of numbers this way; Plato thought that all properties and objects we could think of must have some such independent existence. Confusingly, this kind of idealism was once termed "Realism".)
Not all religion and belief in the supernatural is, strictly speaking, anti-materialist in nature. Many types of religious belief are specificially idealist (for example, Hindu beliefs about the nature of the Brahman), although mainstream Christian doctrine affirms the importance of the materiality of Christ's human body and the goodness of the material world.
Zen Buddhism tends towards idealism.
Surrealism began as vaguely idealist before tending more towards materialism.
In general parlance, the word is also used to describe a person having high ideals, sometimes with the connotation that those ideals are unrealizable or are at odds with "practical" life.