Some TMNT stuff really isn't for little kids.
He comes from the Pantheon, a family of powerful ancient beings, of which Kitsune, as his sister is also a member. He acted as the Pied Piper of Hamelin, at times using his powers to both reward and punish mankind.
While Splinter and Leonardo were walking in the sewers discussing whether they should attack the Foot Clan or stop General Krang's plan to construct the Technodrome, he spirited them away to his lair where he proceeded to torture them with his powers. He revealed some information about himself to them, telling them he comes from the distant past, when he and his family ruled over mortals, each vying for more power than the others. As mankind's power grew however, the Rat King and his family had to lie low, so he used his power sparingly, sometimes rewarding the people, sometimes punishing them. He stated that he knew he would have to lie in wait for a long time, until the world was again ready for the extraordinary, as it was in the days of Noe.
Rat King was asked by Splinter what any of this has to do with him and his family. He explained that this world is his family's chessboard, and they use individuals as pawns in their game however they see fit. The Rat King stated that he wishes to see how powerful Splinter and Leo are, and he begins working his magic through rhymes. Splinter is able to move again, but all of a sudden it is Dark Leo standing before him, blaming his father for what had happened to him. The Rat King's magic make Splinter think that Leonardo is attempting to attack him, but Splinter simply dodged his blows, claiming that his only concern is to protect his family. The Rat King, impressed by Splinter's singular drive, switched his focus to Leonardo. In Leo's mind, Splinter tried to attack him, but he was not deceived by the Rat King's trickery. Leo, having learned his lesson from being brainwashed by Kitsune, knows that the real enemy is the Rat King and moves to strike him rather than the evil Splinter.
The Rat King realized that the self-doubt that Kitsune took advantage of when brainwashing Leo is gone, and remarked that Leo has turned that weakness into a strength. In an instant Splinter and Leo were alone again in the sewers, confused. The Rat King then stepped out of the shadows, saying he is impressed with the two of them and that when he leaves, their memory of their meeting with him was erased.
He later reappeared in the April and Casey miniseries, where he followed April and Casey as they were traveling through the desert. He impersonated an old man, claiming that he needed to reach his sister's house, but ended up trapping April and Casey inside a trailer that held a mysterious maze. When the two found each other, the Rat King appeared and brought them to Aka's dwelling place. While his sister spoke with April, he tormented Casey by transforming into a dragon made of rats, and ominously predicting that Casey's weakness will have dire consequences.
He reappeared again at the Pantheon Family Reunion, along with Aka, Kitsune and his other various siblings. When their meeting was infiltrated by the Turtles, the Rat King was delighted at the opportunity to wreak havoc.