It captures a screenshot of your entire screen.
It turns the cursor into a crosshair, which you can drag to select a portion of your screen to capture. Release the mouse button or trackpad to take the shot.
- Command-Shift-4, then space bar, then click on a window
Hitting the space bar turns the crosshair into a little camera icon, which you can move over any open window. Click on your desired window to take a screenshot of it. A screenshot captured by this method features a white border around the window with a bit of a drop shadow.