What does a diagnostic trouble code actually tell me?
Short answer: A trouble code tells you which monitored circuit or system failed a self-test and under what general condition; it points to where to start testing, not which part to replace.
The engine computer runs constant self-tests on sensors, actuators and whole systems. When a test fails under the conditions the engineers defined, it stores a code. P0171, for example, means the computer added more fuel than it expected to keep bank 1 running correctly. It does not say the oxygen sensor is bad, and it does not say there is a vacuum leak. It says the fuel trim strategy ran out of room.
That distinction matters because most comebacks start with someone replacing the part named in the code description. A sensor code can be caused by wiring, a connector, a reference voltage problem, or an actual mechanical fault the sensor is correctly reporting.
Treat the code as a symptom with an address. Check freeze frame data to see the conditions when it set, look for related codes in other modules, check for technical service bulletins, and then test the circuit or system before you order parts. The code narrows the search. The testing finds the fault.
Tools used for this job
General guidance only. Follow the vehicle and tool manufacturer's procedures, and confirm vehicle coverage on the tool maker's list before buying.