Sparks emit when you swipe your finger in the direction underneath Pac-Man's chin when there is a barrier present. You most commonly see this when you swipe to change directions before you reach a corner or "cornering" as described in the in-game help screen.
In the achievement tile above, you would swipe downward in that situation as Pac-Man travels from right to left. To make this real easy, from the start go to a corner and make sparks there. Do so for 1+ seconds and proceed. Like all Namco games, the achievement unlocks at the end of the play session so you'll get it then.