Use the arrow keys to choose which direction you want the penguin to go. The red portal leads to a different location than the yellow portal.
The Description of how the game works is in the comments next to the code.