Well shoot! After reading all of these replies, I'm more confused than ever.
The short quote that Epictetus posted from Wikipedia best captures the technical religious meaning of the word:
"Nirvāṇa is a central concept in Indian religions. In sramanic thought, it is the state of being free from suffering. In Hindu philosophy, it is the union with the Supreme being through moksha. The word literally means "blowing out"—referring in the Buddhist context, to the blowing out of the fires of greed, hatred, and delusion."
'Sramanic' refers to the ancient Indian traditions of the wanderers, itinerent religious/philosophical teachers similar (in some ways at least) to those in Greece during the same years. They existed as sort of a counter-point to the Vedic tradition of the brahmins, the hereditary Indo-aryan priestly class. There were countless sramanic teachers and schools in ancient times. Today some of their descendents still survive in the form of the Buddhists and the Jains. Judging from the social origins of both the Buddha and Mahavira, many sramanas apparently came from the warrior-aristocrat class. There seem to be hints of non-Indo-aryan ideas as well. The period of the sramanas was a period of relatively free-thought and syncretism of ideas originally derived from different sources. Sramanic ideas even profoundly influenced the brahmins (some of whom participated in the movement and were prominent sramanas themselves) and were absorbed and 'Vedacized' in the form of the Upanishads and the Vedantic traditions that remain very powerful in Hindu religious thought even today.
The Sanskrit word 'nirvana' seems to have been in every-day use in ancient India. It meant 'blown out' or 'cooled' (imagine cooling something by blowing on it). From there, it seems to have acquired a medical usage in which it meant 'health', where the idea apparently was recovery from a fever.
In Buddhism, 'nirvana' is the word applied to the 'blowing-out' of the disfunctional psychological processes (the 'kilesas') that give rise to 'dukkha', or suffering. The word still implied health (there are lots of ancient medical analogies in early Buddhism), but this was a psychological/spiritual sort of health.
In Jainism, the idea is that human souls naturally exist in a blissful omniscient state. What pulls them down into limited and painful human existence is karma. So in Jainism, the idea is to cleanse one's soul of karmic contamination through ethical behavior, meditation and the practice of austerities. (There isn't any monotheistic-style god in Jainism, so it's another example of what might be called an atheistic religion. But Jains do believe in eternal human souls, while Buddhists don't.)
And Hinduism adopted the nirvana idea as well in the form of Vedanta, where the religious goal is to become directly aware of, ascend to (or in some versions, to realize one's present identity with), and (in some versions of Vedanta at least) to merge with and be absorbed by the Godhead (which is imagined in personal or impersonal ways, depending on tradition and sect).
And just to make things more complicated, some later traditions of Buddhism were in turn influenced by those Vedantic-style tendencies, and imagined Buddhist nirvana as a realization of or union with a transcendental 'Buddha-nature' or something, an ineffable reality that supposedly underlies all of illusory mind-and-karma generated phenomenal existence. So historically in India, the Hindu and Buddhist strands kind of flowed back towards each together and eventually remerged over the centuries. The later ideas in turn strongly influenced some of the varieties of Buddhism that took root in China and Japan.