From the Super Mario Wiki
Trampoline Time is one of Mario's minigames in Super Mario 64 DS and a Variety Minigame in New Super Mario Bros.. In this minigame, the player has to draw trampolines so that the Mario clones can jump on them and bounce to open windows.
The game starts with a giant trampoline that will disappear after three Marios land on it. A player can draw more trampolines with the Stylus; however, they will disappear with only one Mario landing on them. If a Mario lands on the center of a trampoline, he will bounce higher than normal. Also, if a Mario hits a wall at the right angle, he will jump off of it for even more vertical distance. If three Mario clones fall off the screen, the game ends.
Draw a line on the Touch Screen to create a trampoline. You can draw up to three lines at a time. Use the trampolines to bounce Mario to safety!