If you have Lion or Mountain Lion, supported programs will reopen their existing windows when you relaunch them. You can permanently turn this off by going to System Preferences > General and clicking the checkbox that says “Close windows when quitting an application” in Mountain Lion. That said, there is also a way to do this just once instead of all the time.
If you press the Option-Command-Q shortcut while closing down an application, it will discard its saved windows, leaving behind any trace of your previously used tabs, or files in apps that support the feature.
But, what happens if you’ve quickly closed something embarrassing using just Command-Q and then someone wants to use Safari? We wouldn’t want them seeing those risqué websites you’ve been visiting, would we?
That’s also easy: hold down Shift as you click on an icon, like Safari, in your Dock and it will override any saved windows that you have and open a fresh window. The window that will pop up will be whatever you have configured in Safari > Preferences > General > New Windows Open With section of the preferences options.
Image Credit: The Mac Observer