From the Super Mario Wiki
Coney Island is an ocean-side amusement park in the southern part of Brooklyn. Despite its name, Coney Island is not an actual island, but rather a peninsula.
Prior to the events of "Flatbush Koopa", King Koopa has discovered a Warp Pipe connecting the Mushroom Kingdom to Brooklyn. Wanting to get back at Mario and Luigi for foiling his plans too many times, King Koopa travels to Brooklyn with his Koopa Troopas, and starts to wreck havoc throughout the town. Believing that they have ejected King Koopa from Mushroom Kingdom, Mario and Luigi use the Warp Pipe to return home, but are soon led to Coney Island by two Koopa Troopas.
Arriving at Coney Island in a taxi, Mario and Luigi come just as King Koopa and several Koopa Troopas replace the park's entrance sign with one that reads "Koopa Island". Mario and Luigi listen as King Koopa announces his plans to take over New York City, which leads the cabbie to seek assistance from the police. Before the cabbie can escape, King Koopa uses his Koopa scepter to transform the cabbie and his taxi into bricks.
King Koopa then tells the Mario Bros. that he intends turning everyone in Brooklyn into bricks, as he wants to sabotage Mario and Luigi's hometown for revenge. While King Koopa is ordering his Koopa Troopas to attack them, Mario and Luigi bounces off their heads and onto the nearby roller coaster track, where they kick a Koopa Troopa out a car and ride the roller coaster.
King Koopa then orders the Koopa Troopas to attack Mario and Luigi upon the roller coaster, and soon enough, the brothers find themselves driving toward a car full of spear-wielding Koopa Troopas heading in the opposite direction. Unable to stop, Mario and Luigi leap out the car and ran down the track from the incoming Koopa Troopas, where they find themselves running in a seemingly endless loop.
Wanting to put a stop to their running, King Koopa and several more spear-wielding Koopa Troopas station themselves on an upcoming section of track and prepares to attack Mario and Luigi. King Koopa and the Koopa Troopas are stopped when Princess Toadstool drives a garbage truck into the amusement park and crashes into a support column of the roller coaster, which creates a hole Mario and Luigi fall through, although they land in the garbage inside the truck. The Koopa Troopa car flies into the nearby water, while King Koopa and the Koopa Troopas accompanying him crashes into a carousel.