These are called screenshots.
To take a full screenshot of your screen, press Shift-Command-3 and the file will save to your desktop.
You can also take a selection screenshot by pressing Shift-Command-4 and then click-dragging the crosshair over the area you want to save.
A further modification is to press Shift-Command-4, followed by pressing the space bar and the cursor will turn to a camera, which you can use to highlight a window and click to take a screenshot just of that window.
Finally, you can include the Control key with any of these combinations, to save the screenshot directly to the clipboard instead of to a file on your Desktop. This will make pasting into some applications quicker and easier.