The Mysterious Stranger was a nickname given to Revan by Ajuur the Hutt when he participated in the dueling tournament on Taris held within the Taris dueling ring in one of the Upper City's cantina. The name was inspired by Revan's current lack of history on that world, having only just come to the planetary city in the wake of his and Carth Onasi's escape from the attack on the Endar Spire.
Revan, with a reprogrammed identity, preferred to compete under his presumed birth name, but Ajuur thought that "Mysterious Stranger" sounded much better; in addition, Carth suggested this anonymity in case the Sith forces occupying Taris had come upon a crew manifest aboard the Endar Spire before its destruction. As the Mysterious Stranger, Revan would go on to fight and defeat Deadeye Duncan, Gerlon Two-Fingers, Ice, Marl and then Twitch. Once he won that fight he was named Taris Dueling Champion and was deemed worthy of a duel to the death by Bendak Starkiller.
The "Mysterious Stranger" nickname reappeared hundreds of years later when the Alliance Commander, participating in the Eternal Championship, was given the nickname by Dominaire.
Though it comes from a canonical source, the dueling sequence is an optional sidequest within the game Star Wars: Knights of the Old Republic. The player does not have to compete in the events there; in addition, dueling Starkiller to the death is also a dark side option and therefore, perhaps non-canon.
The player can give his character any name he (or she) likes, however plot-wise, Ajuur always insists that the player duels under the moniker 'Mysterious Stranger' as more 'catchy'; this is because the announcer's voice (during the duels) is pre-recorded, thus making the use of a custom name impossible. In the German version, Revan is called "Mysterio" instead of "Mysterious Stranger".
In a scene cut from the final version of the game, Revan may encounter Deadeye Duncan on the planet Manaan. After learning that his opponent was a Jedi, Duncan asks for permission to use the "Mysterious Stranger" alias for himself to increase his reputation and the player would have the option to accept or refuse.