To create a closest point constraint with default options
By default, Maya creates the constraint (closestPointOnMesh, closestPointOnSurface, or nearestPointOnCurve) with one locator to represent the input position, and one locator to represent the closest point.
You can view the closest point information in the Attribute Editor. (See View closest point constraint result.)
To set options and create a closest point constraint
The locator types you selected are created and constrained to the mesh, surface, or curve, and Maya creates a closestPointOnMesh, closestPointOnSurface, or nearestPointOnCurve node. If you selected both locator types, the Input Position locator is created at the origin, and the Closest Point locator is created relative to that point.