In Hindu tradition, nirvana (more commonly called moksha) is the reuniting with Brahman, the universal God or universal soul. In traditional Hinduism, a soul reaches this state after living many lives in which it climbs up through the varna, or caste system.
Humans accumulate good karma by performing the duties of the caste they were born in. If a person is born in a lower caste, his only hope is to behave properly in that caste so he will move up to a higher caste in the next life.
When a soul has reached the upper castes, it may escape the cycle of reincarnation by eliminating bad karma. This includes setting the scales right through good deeds (possibly over several lifetimes) and also removing oneself from all earthly distractions. When a soul finally escapes the karmic cycle, it becomes one with Brahman when the last bodily incarnation dies. This is a higher plane of existence that transcends the suffering of earthly life. Essentially, the soul rejoins the intangible energy that created the universe.
Buddhism arose out of Siddhartha's alternate understanding of samsara and transcendence of earthly life. In the Buddhist philosophy, the best path to enlightenment is somewhere in between the luxury of many in the upper castes and the poverty of the most devout Hindu holy men.
Siddhartha was also a social reformer of sorts. He taught that anybody might achieve higher enlightenment and escape from samsara if he followed the right path, completely rejecting the caste structure that defined traditional Hinduism. This is arguably the most important difference between the two religions, at least when Buddhism was born.
The worlds of Hinduism and Buddhism, and the concept of nirvana, are rich and multi-faceted. As in most religions, you can summarize the fundamental ideas quickly, but you could easily spend your whole life studying the details.
To learn about some of the different practices and philosophies of these religions, check out the links in the next section.