On my Linux it's just a button on my key board but for Macbook- Take a picture of the whole screen is
⌘-Shift-3
Take a picture of part of the screen is
⌘-Shift-4, then drag to select the area you want in the picture.
To cancel, press Escape.
Take a picture of a window, a menu, the menu bar, or the Dock is.
Press ⌘-Shift-4, then press the Space bar. Move the pointer over the area you want so that it's highlighted, then click.