TL;DR
They belong to the same family of solvers, where sphere tracing is one method of ray marching, which is the family name.
Raymarching a definition
Raymarching is a technique a bit like traditional raytracing where the surface function is not easy to solve (or impossible without numeric iterative methods). In raytracing you just look up the ray intersection, whereas in ray marching you march forward (or back and forth) until you find the intersection, have enough samples or whatever it is your trying to solve. Try to think of it like a newton-raphson method for surface finding, or summing for integrating a varying function.
This can be useful if you:
- Need to render volumetrics that arenot uniform
- Rendering implicit functions, fractals
- Rendering other kinds of parametric surfaces where intersection is not known ahead of time, like paralax mapping
- Etc
Image 1: Traditional ray marching for surface finding
Related posts:
Sphere tracing
Sphere tracing is one possible Ray marching algorithm. Not all raymarching uses benefit form this method, as they can not be converted into this kind of scheme.
Sphere tracing is used for rendering implicit surfaces. Implicit surfaces are formed at some level of a continuous function. In essence solving the equation
F(X,Y,Z) = 0
Because of how this function can be solved at each point, one can go ahead and estimate the biggest possible sphere that can fit the current march step (or if not exactly reasonably safely). You then know that next march distance is at least this big. This way you can have adaptive ray marching steps speeding up the process.
Image 2: Sphere tracing* in action note how the step size is adaptive
For more info see:
* Perhaps in 2d it's should be called circle tracing :)