If you are just fixing your own car, go to
www.batauto.com
They have detailed instructions how to obtain and interpret
the trouble code from just about all cars.
If you want to build interface for some project, you will
have to specify protocol (J1850, ISO9141, ISO9141, LIN, PWM...).
I made couple of ODB2 interfaces for ISO9141 and wrote program
in VB for communication with ECUs for Honda.
Note that most of the cars out there will talk ISO9141 (all European,
all Asian and ca. half American).
Here is very simple schematic that doesn't use special parts.
You don't need to worry about L-line so you can even simplify it
if you want to (I always used only K-Line).
The circuit is plain level shifter designed probably by some Russian
guy (the website I found it looked Russian to me).