The Pygame Documentation is a great reference.
pygame.display.quit() will uninitialize the Pygame window. If you're running your program from IDLE, this call is necessary for the window to properly close. If you are running it via python.exe (by double clicking the .py file), the window should close without unitializing the display module. However, it's still best to call pygame.display.quit().