The answer is "Publication 28,"
https://pe.usps.com/text/pub28/welcome.htm, which is long an boring but has the exact details of how USPS wants mail addressed. Now, the thing is, when you send mail first class USPS will apply human effort to understand the address (often to the point of getting it to a post office in the correct city to see if they know what the address means via local knowledge). For this reason addressing mail simply to a large institution often still works fine, although it might get there more slowly because of being rejected by the automated processing machines and having to wait in a queue. The way this works architecturally is that machines attempt to parse the address via OCR and, if that fails, present a scanned image to a human at the remote coding center who then interprets the address. For many mailpieces but seemingly not all, I'm not sure what the exact details are on this, once the address is read once an IMB barcode is added and from there the mailpiece can skip address interpretation as everything just works off of the IMB. To avoid issues with contrast against whatever background it gets printed on the IMB barcode added by processing machines is in a UV-reactive ink that appears very faint under visible light, so you often don't notice it.
Publication 28 becomes far more important if you are a bulk mailer, because when you pay bulk rates or in general enter mail via a business mail entry unit (BMEU), your discounts for bulk mailing are contingent on your preparing the mailpieces exactly the way USPS wants them. This means you need to validate addresses against USPS's database, format them exactly as expected, and include an IMB barcode from the start. This ensures that it will all process through the automated equipment which saves USPS some money and justifies the bulk discounts... along with other bulk mail requirements like presorting by destination, bundling/bagging according to USPS's shipping specs, etc.
IMB barcodes nominally identify exactly where the mail should be delivered, i.e. to the "delivery point" or physical spot, but I'm not sure if this is universally true. There are a lot of sort of odd cases, for example PO boxes have their own ZIP codes and the ZIP+4 on a PO box is typically the ZIP and the box number... but large post offices often have five digit box numbers, in which case curiously the specification is that the ZIP+4 should use the last four digits of the box number. The way this oddity has been explained to me is just that the ZIP+4 was originally conceived as ZIP plus a four-digit route number, but PO boxes have never been handled as "routes," so the +4 is actually sort of meaningless and just needed to be filled with something. But I assume in the case of IMBs the +4 and DP are used to resolve the issue of five-digit PO boxes with the same last four. This also gets weird with the post offices that have lettered PO boxes (e.g. "PO Drawer H," a valid address in a rural PO in my area), I have no idea how this is handled with IMB.