From the Super Mario Wiki
The Koopa Troopa Sub is a boss in the game Yoshi's Safari. It is the boss of level 11: Dark Sea. It is a very large Koopa Troopa-based submarine with a turret mounted on its back. The turret rotates and features four guns manned by seemingly ordinary Koopa Troopas. After the upper turret is destroyed, the sub reveals even more guns mounted under its pop-up shell. Firing into its open mouth destroys the rest of its weapons, thereby causing the submarine to sink into the Dark Sea.