Hinduism and Buddhism both emerged from India out of the same Vedic traditions, splitting off from one another around 2,500 years ago.
The oldest texts that could be considered part of the Hindu tradition pre-date the earliest Buddhist texts (and the life of the Buddha himself), but the practice of Buddhism pre-dates the organized Hindu religion that we see today.
Central to Hinduism is a rich tradition of metaphysics and cosmological structure; everything is god, god is everything, and everything that exists is an incarnation of this godhead. God is synonymous with the cosmos, and the self is synonymous with god. In this view, the goal of a Hindu is to live in accordance with Dharma—a sort of cosmic order achieved through unity of the self with the supreme self/consciousness (Atman/Brahman/god).
This is where Buddhism is diametrically opposed to Hinduism: the Buddha taught that there is no god, no soul, no self, that our minds are detached from the world, and that suffering is an innate aspect of human life. For a Buddhist, the ultimate goal is to extinguish suffering and achieve Nirvana (which can be interpreted as everlasting happiness, liberation, and/or emptiness).
This all may seem a little bit confusing at first glance. To paint a simpler picture, the classical Buddhist text, The Dhammapada, begins with these lines: