From the Super Mario Wiki
Puzzle Panel is a Minigame in Super Mario 64 DS and New Super Mario Bros.. In the former, it is one of Yoshi's minigames, and in the latter, it is a Puzzle minigame. It is based on the game Lights Out.
It involves the player attempting to match the touch screen picture with the top screen picture. The screens are made of many panels that have Super Mushrooms on the front and Cape Feathers on the back. To match the two screens, the player must touch a panel with the stylus to turn it around. However, flipping around a panel makes the surrounding panels flip around as well, adding a challenge. There is a game called Puzzle Panic that is similar, but there are more panels to flip. If the panels are flipped correctly, the two Yoshi statues on the left and right blasts off into the air.
In multiplayer, this game is timed for thirty seconds. If the panels are flipped incorrectly, one point will be lost; if they are correctly flipped, the player will earn one point and move to the next level. When the timer reaches zero, the player with the most points wins.
Match the Touch Screen picture to the top screen. Touch a panel to turn over the surrounding panels. Harder levels will take more turns to solve.