If you extensively use your Mac, you might regularly end up with many windows and tabs open on your screen at once, and organizing your workflow around these windows can sometimes be a chore. To help in this process, Apple has included its Expose and Spaces features in OS X, and in Lion has implemented a combination of these two options called Mission Control, but these graphical approaches have limitations.
If you have too many windows open, sometimes you might need to preview them before closing them, and while you can use Mission Control and similar tools to browse through the windows on your screen, with many open this may be rather difficult to do. A further frustration in previewing the windows you would like to close is that as you close them their locations shift around in Mission Control, so if you select one and close it, the next time you invoke Mission Control others that were in one location will be in a different place.
In this respect, Mission Control and other graphical approaches to managing windows do have their limits, so the best option to manage them might still be to use keyboard shortcuts.
This key command is an age-old option that is available on most computer systems. By pressing Command-Tab you will switch among open programs on the system. In OS X the tab order is based on the last programs used, so if you have just switched from Safari to Pages, then pressing Command-Tab will take you right back to Safari. Holding the Command key and pressing Tab multiple times will select other applications.
While Command-Tab moves between programs, Command-tilde (the symbol key right above the Tab key) will switch between the open windows in the current program. This in combination with Command-Tab will easily allow you to locate windows within a program and quickly preview them all as they pass by, so you can get a good look at them before closing them, all without having them zoom in and out multiple times as you invoke Mission Control or Expose.
The last option for managing windows is to switch among the various tabs in programs that support them (mainly Web browsers). In OS X you can do this by pressing Control-Tab, and if the current window contains more than one tab you will swap around among them.
Using these three options, you can instruct OS X to quickly display different windows on screen at their full view, and when you see one you no longer want, you can press Command-W to close it. These options in conjunction with Expose, Spaces, and Mission Control can greatly help you take control over your open windows and close them, especially in OS X Lion where the resume feature can result in a program constantly opening many windows whenever opened, resulting in you needing to thin them out a bit before you next quit it.
UPDATE: As mentioned by folks commenting, these Command-based hotkeys can be reversed by including the shift key, so for instance, Command-Shift-Tab will cycle through programs in reverse order.