If your mac turns on and is connected to wifi, go to the top left Apple logo, and select "ABOUT THIS MAC", the "size and year" will be displayed:

On older Operating Systems Click More Info to get the specifications:

 

if you are unable to turn on the mac, here are the PHYSICAL serial locations:

 

all iMacs

all macbooks:

only 2008 Macbook models (Under the battery)

the macbook serial locations are on the back panel, in or around the area shown, depending on the model, excluding all 2008 models.

 

Please note:

 there are cases where the serial number is incorrect or has been removed. In this case you can find the "A1XXX" model reference located in the same area, this will give you the APPROXIMATE macbook type and year.

If you are unable to find the A reference number, the next step is to compare the internal structure of the macbook to our detailed videos to identify the correct model.