Nick, a wastegate bypasses exhaust gas around the turbine wheel when the compressor side (fresh air) actuator senses too much boost.
When the exhaust gets re-directed it does not act on the turbine wheel, thus lowering the power available to turn the compressor side and that limits and lowers the PSI of boost until the pressure drops enough to close the wastegate.
Its a governor of sorts. Too much boost can be bad for an engine, stresses the head bolts, gaskets and bottom end.