Darth Revan was a Jedi who lead the Old Republic to victory over an uprising by the Mandalorians approximately 4000 years BBY. After defeating the Mandalorians, Revan and his apprentice, who would become Darth Malak, sought and found a mysterious power source that they used to found a new Sith Empire and attack the Republic.
During a Jedi raid on Darth Revan's flagship, Darth Malak betrayed his master, ordering his own ship to open fire on the flagship. Revan was seriously injured in the attack and captured by the Jedi.
The Jedi used their powers to erase Revan's memory and alter his personality. Retrained as a Jedi, he was sent with padawan Bastila Shan to retrace the path that led to his founding of the Sith Empire. They discovered that the source of the Empire's power was an ancient alien space station called the Star Forge. They eventually defeated Malak and helped a Republic fleet destroy the Star Forge.
Revan left a year later, but at some point he fathered a child with bastila shan which would result in Satele Shan; Ironically, Satele ended up becoming the Jedi Grand Master despite being descended from one of the most powerful Dark Lords
There has also been a recent retcon in which revan actually worked for the true sith, and was corrupted by the sith emporer. Needless to say, it has been controversial.