how to extrude a curve to create a hollow torus
I think you are talking about Bevel for Curve:


Create two curves, one for section (tori), one for path;
Select the path curve, find Bevel Object in its Object Data panel, choose the other one as the bevel object. Then you can scale either of them to change both ratios for it.