An overflow just works with gravity, basically. Some have them built in or some you can buy separate that hang in the tank (a separate overflow box). Basically, as the water drains over the overflow, it goes into the sump and returns to the tank via the return pump. Get it? "Over" "Flow."
Here's an example of a built in overflow.
and this is an overflow box that is designed to sit inside the tank:

__________________
Current setups: 1800 gallon koi pond, 10 gallon planted, 150 gallon reef, other FOWLR tanks