From the Super Mario Wiki
Rap Land is built upon rap music, as most of the buildings resemble either stereos or speakers, which constantly play rap songs all day. The citizens of Rap Land are all rappers and live under the rule of King James. Two notable citizens of Rap Land are the Flab Boys.
When King Koopa came to Rap Land, he took on the alter-ego of "Rappin' Koopa", tied up King James, and took over his castle. Rappin' Koopa played a hypnotic theme on all the speakers throughout Rap Land, luring all of the citizens into a trance and told them to give him all their Gold Coins.
Mario, Luigi, Princess Toadstool and Toad met with the Flab Boys upon arriving in Rap Land and tried to figure a way to save King James and Rap Land from Rappin' Koopa. While Princess Toadstool managed to sneak Toad into the castle, she herself was captured by the Koopas and was taken hostage along with King James.
Toad managed to rescue them before they could get stabbed with a giant record needle, and they met up with Mario, Luigi and the Flab Boys in another part of Rap Land, away from the castle. It was there that King James pointed out Rap Land's power supply: a hydroelectric dam. After Mario unplugged the cord, he succeeded in putting an end to Rappin' Koopa's tyranny.
Mario then trounced the Rappin' Koopa troop in a rapping duel, forcing King Koopa to escape from the city through a Warp Zone. With everything back to normal, Rap Land celebrated the return of King James, while Mario and his friends danced to the Mario Rap.