That's called a jackshaft kit or a shift kit.
There's a short engine chain to a horizontal shaft that goes over to the right side. Then another short chain from that side of the shaft down to a double front freewheel sprocket. Third long chain goes to the rear wheel, through the derailleur if you have one.
If you're a machinist, you can build your own. If not, buy a kit: Sick Bike Parts