A wastegate is essentially a valve that bypasses exhaust gases around the turbine.
This limits the max speed the turbine can achieve, and therefore limits the peak boost the turbo can make.
Wastgating is necessary to limit turbo RPM, and boost pressure on turbos with smaller exhaust housings that are used to lower spool up time of the turbo. The wastgate allows the turbo to "swallow" a larger volume of exhaust gas without sending the turbo into orbit.