There are lots of reasons why you might need to identify your Mac's serial number: most commonly this would be needed to get help with a technical issue from Apple support, or to check the status of your warranty.
This article explains how to find the serial number, even if your Mac is refusing to turn on and you can't find the original packaging.
About this Mac
Assuming your Mac is operational, click the Apple dropdown at the top-left of the screen and select About This Mac. The serial number is listed near the bottom of the Overview pane.
Packaging & receipt
Perhaps your Mac is not working well enough to open dropdown menus. Well, you can find the serial number on the packaging, if you still have it. It'll be printed next to a barcode.
It's also worth checking the receipt or invoice if you've still got those.
On the Mac itself
In some ways this is the easiest method, and certainly the one to use if your Mac won't switch on and you've not got the packaging. It's just that the location of the printed serial number varies between Mac models so it can be a faff to explain where you should be looking.
Generally speaking you're looking for the label "Serial no", which will probably be printed on the bottom, or occasionally on the back.
MacBook, MacBook Air and MacBook Pro
On all of Apple's current and recent laptops the serial number is printed on the bottom of the machine. Look for the regulatory markings - it'll be with them.
The iMac's serial number is printed on the bottom - the 'foot' of its stand.
A Mac mini always has its serial number printed on the bottom, near the back (on the end nearest the ports). It will be labelled as Serial No.
If you've got the 'trashcan' Mac Pro (the late 2013 model), then you'll find the serial number printed on the bottom of the chassis. But the older design of Pro has it printed on the back - it's just below the video ports.