1. Connect your phone to your PC's COM port with a data cable. 2. Start any terminal program (e.g. Hyperterm) and select a port the phone is connected to. 3. Type in "AT+CIMI" command (w/o quotes, terminated by Enter). 4. See result.
You most likely want the IMSI number to try and identify the carrier your phone is locked to, correct? Get yourself a sim card reader, as that's the only way I know of to obtain this number from a non-jailbroken iPhone.