Use arrow keys or WASD to control. After collecting 10 coins, the white blocks will open. After collecting 60 coins, the gold blocks will open. For the blue and red blocks, you will need to find a switch. The flags are checkpoints. If you fall in lava, you will return to your most recent flag. To avoid the spikes which appear late in the game, you have to go over them when they are down.