Traditions vary on what happened. Some say Siddhartha made a great vow to Nirvana and Earth to find the root of suffering, or die trying. In other traditions, while meditating he was harassed and tempted by the god Mara (literally, "Destroyer" in Sanskrit), demon of illusion. Other traditions simply state that he entered deeper and deeper states of meditation, confronting the nature of the self.
In the Pali Canon, there are several discourses said to be by Buddha himself, related to the story. In The Longer Discourse to Saccaka the Buddha describes his Enlightenment in three stages:
1. During the first watch of the night, the Buddha discovered all of his past lives in the cycle of rebirth, realizing that he had been born and reborn countless times before.
2. During the second watch, the Buddha discovered the Law of Karma, and the importance of living by the Eightfold Path.
3. During the third watch, the Buddha discovered the Four Noble Truths, finally reaching Nirvana.
In his words: My heart, thus knowing, thus seeing, was released from the fermentation of sensuality, released from the fermentation of becoming, released from the fermentation of ignorance. With release, there was the knowledge, 'Released.' I discerned that 'Birth is ended, the holy life fulfilled, the task done. There is nothing further for this world.'
All traditions agree that as the morning star rose in the sky in the early morning, the third watch of the night, Siddhartha finally found the answers he sought and became Enlightened, and experienced Nirvana. Having done so, Siddhartha now became a Buddha or "Awakened One".
From the Wikipedia entry on Bodhi Day