This is a real game loop, and the game runs exactly these lines, in this order, every frame. Switch lines off, move them up and down, pause and step through one line at a time. Break it, then fix it.
The picture only changes at wait for the next frame: that's when what you drew is shown.
Press Reset to fix everything.