Locus y = f(x) or f(x,y) = c of a point (x,y) is the path taken by the point (x,y) when a certain condition or constraint is followed. Locus can also be taken as the set of all points that satisfy the given constraint.
Locus of a point (x,y) such that its distance from a fixed point (say origin) is constant is a circle, as in x² + y² = r².
In three dimensions, it is a sphere, x²+y²+z² = r²
All the points on the locus satisfy this constraint, that the distance from origin is r.
Locus in three dimensions of line in 2-dimension is the curved surface that is generated or traced, when given conditions are followed.
Suppose there is a line x = a in 2-dimensions. This line is rotated around y axis in the x-z plane. Then the locus of the line (all points on the line), is a cylindrical surface with central axis as the y axis. the locus will be
x² + z² = a², for any y from -infinity to +infinity.