It is not the Maximum amount of heat. It is the rated heat that you are expected to dissipate to maintain baseclock performance. Boost profiles and other power limit modifiers like PBO will change the amount of power required and the amount of heat you need to dissipate.
CPUs will often exceed the TDP supplied by the manufacturer for significant amounts of time as long as temperatures allow. GPUs do this as well, but for only brief instants. Some older power supplies will trip / trigger a restart if they can't handle sudden power spikes.
In terms of power supply, yes, the power input required roughly equals the power output, though that depends on the efficiency of your power supply, and in the case of CPUs, the efficiency of your motherboard VRMs. Always best to over spec a powersupply by around 100W over the worst case, or more as total power requirements rise.
There is no real standard for TDP, so best to go along with reviews when picking CPU coolers.
You may also see the term TBP (Total Board Power) Which is often what GPUs are covered under.