From the Super Mario Wiki
In the minigame, there are some pillars and Mario and Luigi are standing on top of one. A Hoohoo Spirit appears in mid-air, and because the pillars are apart from each other, Mario and Luigi need to Spin Jump from the pillar to the next, grabbing a Hoohoo Spirit along the way. Once the brothers beat the minigame, they continue with their mission and fight Hoohooros.
They need to get ten spirits in less than thirty seconds. The Nintendo 3DS remake, Mario & Luigi: Superstar Saga + Bowser's Minions extends the time to thirty-five seconds. If the brothers did not make it from a pillar to the next and fall down to the ground, they need to restart the minigame.
Names in other languages