From the Super Mario Wiki
Mix-a-Mug is one of Yoshi's minigames in Super Mario 64 DS. To unlock it, Yoshi must capture a Rabbit in Princess Peach's Castle. To play, the player has to line up three parts of a random character (either Mario, Wario, Luigi, Princess Peach, or Yoshi) so that they make a face (similar to slots) to win coins. It is similar to the slots minigames of Super Mario Bros. 3.
In Super Mario 64 DS, the player must touch the wheel they want to stop when they want to stop it (either the chin, the face or the hair) with the stylus. If the player lines up the correct three in a row, they get a star. Once they get five stars, they are all combined into one five-star star, and the game keeps going.
 In-Game Instructions
Line up the slots on the Touch Screen to form a face. Win more coins by matching the center face in the slots to the one on the top screen.