Press the up and down keys to dodge the obstacles. On level 3 & 4, you are immune to some rectangles.
Little note: This is not completely glitch proof!