Cars since 2001 have the OBD-II port in Europe. US since 1996 I think.
There are various types of OBD-II connectors around. The ELM327-chip inside makes it easy to communicate with the car, since the chip makes the communication ASCII-based for us. All you have to do is send the right commands, and you will get a response in ASCII.
If the application should be ran on a smartphone, I have a few warnings for you.
Most connectors have bluetooth implemented, and Android will support that, but WP7, Win8RT and iPhones don support the bluetooth serial port communication you will have to set up. There are also wifi ad-hoc based connectors and it might be possible with them.
http://en.wikipedia.org/wiki/OBD-II_PIDs
On wikipedia there is a list of commands you can send to retrieve real-time data.