You can use the Spin Tool
. For example if you add a Bezier curve, you have to convert the curve to a mesh by doing
1
Click RMB > Convert To > Mesh.
2
Press tab to switch to Edit Mode
3
Press 1 to switch to Vertex Select mode
4
Press A to select all vertices
5
Click the Spin Tool in the left toolbox
6
Select the axis you want to spin around (here X)
In this example my 3D Cursor is at the World Origin so you have to take its location into consideration we well as the spin function revolves around this cursor.
