You really do need to know this to make full use of PsychoPy. You display is updated at a constant rate (say 60 Hz). Code in this tab runs once on every such screen refresh. This allows you to do things like real-time animation. It also allows you to do things like send a trigger or log a time at a precise point (e.g. on just the first frame on which a stimulus is displayed).
The code in the “Each frame” tab runs before the next update of the screen. So when frameN == 0, when the code is running, what is on screen is still actually the last image from the previous routine. That is why we have this line:
elif frameN == 1: # the zeroth frame has just been drawn
as the code is running just immediately after the first (i.e. zeroth) frame of the current routine has been displayed to the screen. If we ran this code when frameN == 0, the code could be executing up to 16.7 ms before the frame ) actually appears on screen.