How does a Jake Brake Work?

the jack brake works by flipping a switch to were the exhaust doesn’t go back into the engine it goes right out the pipe and doesn’t let the power go to the wheels in turn slowing the truck or RV down to a safe speed.