Soon after you start hacking your phone, you're going to run into ID numbers necessary for various things. Here's a quick rundown.
IMEI stands for International Mobile Equipment Identifier. If your on a UMTS or GSM network (e.g. AT&T in the U.S.) it's the number that identifies your phone -- mostly to the network, but also for things like identifying a stolen phone, resetting the security code and generating the unlock code.
The IMEI is part of the phone's hardware; it's not on the SIM and changing the SIM card won't change the IMEI. (The SIM card has a different ID number, called an IMSI, which is more for identifying you or your account with the wireless company).
When I was trying to get a phone unlocked in England, someone told me it's illegal there to change an IMEI.
The IMEI has 15 digits. You can sometimes find the IMEI on a sticker under the battery or by going through menus for the phone's setting (or something similar. On Nokia phone you can see it by entering "*#92702689#" (without the quotation marks). On other phones, you can get the IMEI by entering "*#06#" .
The IMEI is for UMTS and GSM phones.
CDMA networks ID phones using an Electronic Serial Number (ESN).
ESNs have to be in hexadecimal and they're 32 bits long. Those 32 bits aren't enough to handle the explosion in mobile phone use, so ESNs are being replaced on CDMA networks by a new number called an MEID.
These are the new numbers for identifying phones on CDMA networks. They're 56 bits which I think allows for quadrillions of phones.