From the Super Mario Wiki
The player controls a hairdresser's hand. The game's purpose is to cut the woman's hair inside the yellow glowing part. To do so, the player has to press at the right timing. If done so, the game is won. If the player cuts below the glowing part, they won't lose, but they have to try again. If the player cuts above the glowing part, they lose.