In the old DC comics, Mr. Mxyzptlk was the court jester for the King of the 5th Dimension or something. He befriended the court scientist and then stole his dimensional transporter to break into this dimension.

His name comes from the magic word used activate the thing, which was, oddly enough, mxyzptlk.

He'd crop up from time to time and pull some pranks, like make the mayor lose his voice right before a big press conference or muck up Superman's super-hair.

Superman would always catch him and trick him into saying the magic word which would take him back to his own dimension, which of course was kltpzyxM. ("What, you think you can trick me into saying kltpzyxM again? D'oh." Poof!)