If your Mac turns on
Open the Apple menu (top left), then select About This Mac: the model and year will be displayed.
On the underside of your Mac
Turn the computer over: in the small print, you’ll find the model number (A followed by 4 digits, e.g. A2337) and the EMC number (4 digits). The serial number is also shown there, and you can use it on Apple’s website to look up your model.
Our Identify your MacBook page shows which model each of these numbers corresponds to. On every product page, check that your model number is listed.