This constraint is like a hybrid between Shrinkwrap and Damped Track, in that it follows a surface like Shrinkwrap, but does not move the object, and instead only rotates it so that an imaginary point a given distance along one axis snaps to the closest point on the surface. When the surface cannot be reached by a rotation, the modifier does nothing (alternatively I could change it to track the closest point on the surface, when out of reach, but the usefulness of this behaviour might be debatable).
I believe the best way to describe it is through a small demo.
In this first gif you can see the default behaviour of the constraint (the tracking point has been set 1m along the Y axis, to coincide with the bone's tail).
The next gif shows face culling behaviour, which allows one side of the surface to be ignored, while snapping to it on the other side (similarly to the Shrinkwrap constraint).
Lastly, one can also limit the rotation of the constraint around a given axis, so that instead of snapping to the closest point on the surface, it finds the closest circle intersection (here the rotation is locked around the Z axis).
I see the use cases for this constraint being mostly in mechanical rigs, where something must slide over a surface while pivoting around a defined point (think linkage suspensions, windscreen wipers, etc.)
To make the implementation as optimal as possible, I extended the functionality of BLI_bvhtree_range_query, to optionally allow matches only on the range surface, instead of the entire volume. This is not a strictly necessary change, but it does eliminate a considerable number of false matches, and the gains here only grow as the mesh becomes more dense (and as the constraint distance parameter becomes larger).
For the case when the axis is locked, only circle intersections need to be matched, but I did not modify the BVH function for this case, as plane/bbox intersections are much more expensive than the usual BVH distance checks. So I deemed the BVH spherical surface search to be optimal enough even for the locked axis case.