Whack-a-Goomba is a minigame in Dance Dance Revolution: Mario Mix. In this game, Mario uses a hammer to whack Goombas that come out of one of four Warp Pipes. The player uses the arrows on the dance pad to control where the hammer goes. As suggested by the title, this game is based on Whac-A-Mole.
This minigame is found in World 1, the Mushroom Kingdom. Mario is whacking these Goombas because they are in a pipe with a key to the castle in it and are impeding his progress.
Knock the Goombas out of the way with your hammer of doom!