ClampTo constraint binds the owner on a spline path, and moves owner based on an offset value, which is calculated based on some component of owner's position. When offset = 0, owner at the start; When offset = 1, owner at the end of spline.
(Check Spline Editor manual for instructions on how to make spline)
Check the preview image below:
Here we explain each options in the ClampTo editor;