How to identify which model is my Mac?
There are several way to achieve this. Macintosh models can be identified by several means:


The “human-readable” detailed name Apple uses: e.g., MacBook Pro (15-inch, Mid 2009)
Model Identifiers: e.g., MacBookPro5,3
Model number: e.g., A1286
Serial number
…


While two Macs with the same model identifier or model number may not be exactly the same (e.g., a MacBookPro5,3 may have a 2.66GHz, 2.8GHz or 3.06GHz Core 2 Duo processor, and the GPU may differ as well on those models), they pinpoints models with a precision sufficient for most uses.

If your Mac is running properly on OS X, you can get the Model Identifier by doing the following:


Go to the Applications > Utilities folder.
Run System Profiler. (System Information in Mavericks)
On the left panel of the window that opens, select Hardware (the default selection)
The Model Identifier appears with other info about the Mac in the right panel, including the serial number.


For other ways to get to the serial number of your Mac you can:


Select About this Mac in the Apple menu on the top left of your screen. In the small window that appears, click the system version (e.g., Version 10.9.2) twice. Your Mac serial number is displayed instead.
Or, more simply and especially useful if your Mac is not booting, read it on the Mac itself, as the serial number is printed on it somewhere, in very tiny letters. Older Mac laptops with removable batteries have the serial number inside the case with the battery removed. You can find out precisely where the serial number on your Mac lives at this Apple KB link.


Once you have the serial number, you can get the precise model name by going to this page on the Apple website and typing your entire serial number in the adequate field.

If you need info on materials that your Mac support, or if you need to find the model number of your Mac when you have its identifier or serial number, you can use various databases that exists here and there. I usually go to this very useful page from everymac.com, as it list quite a big deal of technical info on each model. You can type model identifiers, model number or the few last symbols of a serial number to find its related info.