From the Super Mario Wiki
Snowball Slalom is a Minigame in Super Mario 64 DS and New Super Mario Bros.. It is classified as one of Wario's minigames in the former and an Action minigame in the latter. The player must guide the Headless Snowman using the Stylus to the finish line as fast as they can. However, there are rocks and penguins in the game, and hitting them cause the snowball to decrease in size and slow down.
In New Super Mario Bros. The minigame appears as a 1-to-4 player minigame. The single player mode plays the same way, however in multi-player, the minigame turns into a race between all players, the first person to reach the finish line is declared winner.
 In-game instructions
Rub the Touch Screen to roll the snowman's head to the goal before time runs out! Rocks will slow you down, as will touching his head!