OBD-II is a set of standards for implementing a computer system in automobiles. The On-Board Diagnostics II (OBD-II) system was mandated by the US EPA for all 1996 and newer light duty vehicles sold in the United States. All OBD-II compliant vehicles have a standardized 16-pin connector, which is located under the dash on the driver's side.
The OBD-II standardization was necessary to allow different vehicle manufacturers to design their own diagnostic software while still being able to communicate with each other. As a result, there are five major protocols that are used by almost all OBD-II compliant vehicles: SAE J1850 VPW, SAE J1850 PWM, ISO 9141-2, ISO 14230 KWP2000, and CAN bus. Out of these five protocols, three of them are most commonly used by vehicle manufacturers: CAN bus, ISO 9141-2, and KWP2000.
Toyota uses the CAN bus protocol for its OBD-II communication. The Controller Area Network (CAN) bus is a high speed serial data network that was originally designed for automotive applications. It has since been adopted by many other industries such as aerospace and industrial automation. The main advantage of using CAN bus for vehicular applications is that it allows for very high data rates while still being tolerant to noise and electromagnetic interference.