You can capture the entire screen, a window, or just a portion of the screen.
How to take a screenshot on your entire Mac screen
1. To take a screenshot, press and hold these three keys together: Shift, Command, and 3.
2. If you see a thumbnail in the corner of your screen, click it to edit the screenshot. Or wait for the screenshot to save to your desktop.
How to capture a portion of the screen
1. Press and hold these three keys together: Shift, Command, and 4.
2. Drag the crosshair to select the area of the screen to capture. To move the selection, press and hold Space bar while dragging.
3. To cancel taking the screenshot, press the Esc (Escape) key.
If you need further assistance with taking a screenshot or the steps above do not work for you, you may need to contact Apple Support.
Source: Apple Help Center