Avoid the dark squares and follow the colored path to the end.
There are two game modes: NORMAL where you have a different amount of life for each color and HARDCORE where there is no life and you will restart the level as soon as you hit a dark square.