The close() method closes the currently focused window, while the quit() method terminates the entire browser session.