As you may know, combustion engines work by injecting an air-fuel mixture into the combustion chambers for ignition. More powerful combustion means a more powerful engine. However, these combustions need oxygen; the more oxygen, the more power an engine can generate.
A four-stroke engine sucks in air and fuel through their respective valves, compresses the mixture, detonates it, and then blows off the exhaust fumes through exhaust valves into the exhaust manifold. A turbocharger uses the air pressure from the exhaust gases to spin a turbine, which in turn drives a compressor that sucks in air, compresses it, and sends more oxygen to the engine. A turbocharged engine receives more oxygen than its regular counterparts, producing more powerful combustion.
Because a turbocharger needs the exhaust to work, you might need to wait before the extra power from the turbo kicks in. This gap in power is called turbo lag, and it’s one argument against turbos in the turbocharger vs supercharger debate. For air to get to the engine in the first place, the throttle valve must be open. You control the throttle valve with the accelerator pedal. The lower you push it, the wider the throttle valve opens. When you take your foot off the pedal, to switch gears for instance, the valve closes. But your turbocharger may still very well be pumping the same amount of oxygen to the engine.
This unneeded compressed air from your turbo will meet a closed throttle valve, and since the air has nowhere else to go, it will return back to the compression chamber and cause a compressor surge.