He goes by many names, in the Dark Tower universe, he is known as Walter O'Dim, mainly in the Gunslinger as Roland Deschain chases him through a desert and then a mountain seeking information on the Dark Tower. Flagg is generally Roland's oldest enemy.
Randall Flagg first appears in The Stand. After a man-made plague destroys civilization, people are drawn to Flagg as he sets up his new outpost in Las Vegas. He here becomes a demonic warmongering fascist, as he crucifies and tortures disloyal betrayers. He is ultimately destroyed in our world when the Las Vegas outpost is destroyed with a nuclear weapon. However, since it has been said that Randall Flagg has caused trouble in our world under many different names, this doesn't seem to matter. In the end of the book, there is an epilogue where he finds some natives on a beach and becomes their saviour under a different name, repeating the Wheel-of-Ka cycle.
The next Stehen King novel Flagg reappears in "Eyes of the Dragon", as an evil wizard causing havoc on a medieval city.
In the TV adaptation of 'The Stand', he is played by Jamey Sheridan.
He goes by nicknames of "Walkin' Dude", "The Dark Man" and the "Man in Black" and "Dark Man with no Face", and Stephen King says he got the inspiration out of nowhere while in college, and also he attributed some of his inspiration for the character to Donald DeFreeze from the Patty Hearst case.