Without a wastegate, the amount of boost that a turbocharger creates varies with the pressure of the engine's exhaust. This happens because exhaust pressure varies with relation to the engine's speed (measured in RPM's). This implies that as an engine reaches higher RPM's, increasing amounts of boost will be created by the turbocharger. The problem with this is that an engine can only accomodate a given amount of boost. Most stock engines are only meant to take about 10 PSI if not less. In order to regulate the amount of boost that comes into the engine, a wastegate acts as a door only allowing a given amount of exhaust to hit the turbocharger's exhaust turbine. Once the engine starts producing more exhaust pressure then the wastegate system will allow, a flap is opened to redirect excess exhaust away from the turbine blades. In turn, this is where a wastegate gets it's name. It's a gate to carry away waste. In order to regulate when a wastegate opens, a boost conroller can be used.
There are two types of wastegates. The first one is an internal wastegate (right). An internal wastegate is a component on the turbo unit itself. The gate is opened via an actuator which is a diaphram type system (see left picture). Excess exhaust is then fed directly into the exhaust system. We also have what is called an external wastegate (left), unlike an internal wastegate, it is seperate from the turbo unit and does not require an actuator. Excess exhaust can either be fed into the exhaust system or it can be vented straight out and into the atmosphere. High performance set-ups typically follow the latter alternative. Most stock systems come with an internal wastegate as this set-up is better suited for low boost applications. However most aftermarket systems perform better with an seperate external wastegate assembly making it an ideal choice for those generating boost in the range of 20-30 PSI.