A lot of ShaderToy demos share the Ray Marching algorithm to render the scene, but they are often written with a very compact style and i can't find any straightforward examples or explanation.
So what is Ray Marching? Some comments suggests that it is a variation of Sphere Tracing. What are the computational advantages of a such approach?
How do you write a raymarching shader?

Ray marching is a ray tracing variant that approximate intersection points using iterative steps instead of a lookup table. This method is computationally cheaper than exact ray tracing because it doesn't store pre-computed collision results for every object as ray tracing does. Each ray is marched iteratively towards the intersection point, and the process stops when the ray intersects a geometry or reaches a maximum iterations limit.
Why is it used so much in WebGL? Are there any resources for better (or simpler) understanding?

Ray marching is indeed a variation of sphere tracing, which is a technique for rendering scenes which uses ray intersection tests and some smart culling to improve performance. In its simplest form, ray marching is doing sphere tracing in world space, instead of object space.

You can think of ray tracing as shooting a ray from the camera into the scene, and following