You control the snake with the arrowkeys. If the snakes head touch his body or touch the edge he will die.