Unlike with Windows, clicking on the red button does not normally "quit" the application. The application (Safari, in this case) is still running - you just closed one of its windows. To quit the application you have to select "Quit" from the File menu (or command-q, or quit from the dock, etc.).
You can tell the application is still running after you close its window if its name (e.g., "Safari") appears next to the Apple. The little indicator light under its Dock icon would be lit as well.
In my experience with the Adobe Flash installer, when it asks you to quit something you can actually click on the little picture of the application in question and the installer will quit it for you.
-charlie