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 make it turn around. However, flipping around a panel makes the surrounding panels flip around as well, adding a challenge. Also, as the player completes levels, the puzzles take more flips ('turns') to complete. There is a game called Puzzle Panel that is the same game, except with less panels. Unlike Puzzle Panic, Puzzle Panel appears in New Super Mario Bros. as well. If the panels are flipped correctly, similar to Puzzle Panel, the two Yoshi statues on the left and right blasts off and the player advances to the next level.
This minigame takes the Puzzle Panel to a whole new level. Put on your thinking cap. You're going to need it.