Key Ideas
1pygame.init(). Boots every Pygame subsystem (display, font, mixer). Always call it before touching anything else.
2The Display Surface. pygame.display.set_mode((w,h)) returns the screen Surface — the one object everything else gets blitted onto.
3The Game Loop. A while running: loop that repeats every frame: process events, update state, draw, flip.
4Clock & Frame Rate. clock.tick(60) caps the loop at 60 FPS and returns elapsed milliseconds (dt) since the last call.
5Events. pygame.event.get() returns this frame's queued events; always check for pygame.QUIT to let the window close.
6Quitting Properly. Set running=False on QUIT, exit the loop, then call pygame.quit() once, outside the loop.