You do not have your location filled in. It is often a great advantage to indicate the country one lives as most problems involves solutions that is particular to a certain locations.
Different parts of the world telephone system uses different means to send CallerID. If you are lucky, the caller ID might even being sent via DTMF (Brazil, Belgium, Denmark, Finland, Iceland, India, Netherlands, Saudi Arabia, Sweden & Uruguay) and getting at it will be easy.
However, in most telephone exchanges, that information is sent via 1200 baud modulation at the beginning of the ring signal or between the first and the next ring signal. You will need an analog interface circuit to tap out the information from line and then decode it using your microprocessor.
Another method is to use a stand alone caller ID display unit where it can be bought cheaply in most high street shops or eBay and use its interface or even decoding circuit. You just need to tap out the data stream which is already in serial format. It is illegal to connect your circuit directly to the telephone lines so such data tapping usually use an opto-isolator to isolate the called ID unit output signal and your circuit. The following is an example:
BT CID unit and converted it to RS232
You will also need to search for the data format of the Called ID data stream so you can isolate those bytes you wanted.
Edited: The link for author "Jon Payne" inside the above quoted link do not work anymore. This is another link on the same subject for hobbyists in UK only.
**broken link removed**
Also this FAQ:
all you need to know about Caller ID