From the Super Mario Wiki
A Kannon is an object found in Donkey Kong Country 2: Diddy's Kong Quest. To activate a Kannon, the player must throw a Kannonball into it. Next, the player must run into it and a minigame begins. They first appear in Mainbrace Mayhem, and only appear in levels with Kannonballs (not being shot). Additionally, there is an enemy that wields a Kannon in the game, also named Kannon, though that enemy is a Kremling.