Updated June 14th, 2020.
Simplest way: ⌘-Shift-3. Result: time-stamped image, on your desktop. The image is the entire screen, including the menubar. If your Mac’s volume is turned up you’ll hear a camera shutter sound, for those of you old enough to remember when cameras made a sound when you took a picture. You can edit the image if you’d like– just open it up with Preview or any other app that can edit images.
Better way: ⌘-Shift-4, then click and drag a bounding rectangle. Imagine a rectangle surrounding your desired screen capture region. Click at the top left corner of that rectangle and keep the mouse/trackpad button down. Then drag to the lower right corner of that rectangle. Then let go. You’ll hear the shutter sound and find a time-stamped image on your desktop.
Better better way: ⌘-Shift-4, then press the spacebar. The cursor changes to a camera icon. Whichever window you click on is captured. Even if the window is partially obscured by other windows. This is very precise: it exactly captures the window, right to the edge, complete with rounded corners and a really nice drop shadow around it. Result is the same as with the others: a time-stamped image on your desktop. Even if the “window” is the Dock, or a menu, or the menubar itself.
Better better way, variant: ⌘-Shift-4, then press the spacebar, then hold the Option key as you click. This gives you the same perfect edge-to-edge screenshot of the clicked window, without the shadow. Sometimes that’s what you need. Thanks to Glenn Fleishman for this.
BONUS* BECAUSE I’M IN A GIVING MOOD: Hold the Control key down while doing any of the above, and you don’t get a time-stamped image on your desktop. Instead, the image is placed on the Clipboard, ready for you to paste it (maybe into an email). If you’re only taking the screenshot because you want to email it to someone, this is the way to go because it doesn’t clutter up your Desktop with an icon, and rather than “attaching” which can be a chore all you have to do it Paste.
DOUBLE BONUS: with macOS Mojave and later, Command-Shift-5 gives more options, including a delay feature. After you take the screenshot it appears in a small window, for a few seconds. Click it before it goes away and you’ll be able to mark it up and share it, without opening an app.
*These things are supposed to be short. You got more than 60 seconds’ worth this time.