Space to accelerate, arrows to steer, and down arrow to brake. Turning is increased while braking. The blue points are checkpoints that you must touch in order to complete a lap, but you need not touch them in any order. After 3 laps, time will stop.
The penalty is not a simple "time on green = penalty". If you go on the green for x seconds, the penalty will start to increase by x/100 every second. This means that every second you spend on the green area will add to your time even after you leave and will add exponentially if you stay on the green.