Move with a and d or left and right. Avoid the objects before they hit you.
Got the idea from a game on CoolMathGames.