From the Super Mario Wiki
Mario Slot is a single-player minigame in Super Mario 64 DS. It is one of Luigi's minigames. The game consists of three spinning wheels (slots). Before the wheels are spun, the slot machine takes one of the player's coins. To play, the player must touch each of the three wheels to stop it. If each slot shows the same item the player wins and gains coins. If any Superstars are shown the player gains in coins.
Possible winning outcomes and the coins won:
The player can earn extra coins if they get one Superstar and two matching items.
 In-Game Description
Touch the spinning slots to stop them. Get 3 items in a row to earn coins! The Superstar is wild.