How the drain path works
Primary drain from the coil, through a trap, to an approved termination. A secondary drain (or a secondary drain pan under the air handler) with an overflow safety switch that shuts the system off before water leaves the pan.
Common shortcuts
Missing float switch on the secondary pan, no P-trap, drain terminated where clogs go unnoticed, or a pan that's rusted through and not replaced during a coil swap.