Instructions
Play the access path on level three in World 1 to find the first cannon. Level six in World 2 features cannon access, as does the fortress in World 4, the ghost house in World 3 and level 6 in World 6.
Look for the red pipe. The red pipe warps Mario to a special level end with a red flag and you must have a red flag to get cannon access. Players usually need to explore the environment for secret entrances or difficult to reach places, so once the red pipe is spotted, look around the area for the pipe's entrance.
Click on the cannon to make Mario go down the path. Mario will automatically jump in the cannon and shoot to the new level.
Buy the secret goal videos in the castle at the beginning of the game. These show players how to unlock cannons. The video costs vary by level, and can be purchased with coins collected during the game.