From the Super Mario Wiki
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-game instructions
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.