It is used as a measuring device to measure the accuracies in alignment, eccentricity of the parts/components.
A dial gauge is like a fine watch. It consists of a graduated dial, pointer, plunger and a clamp. It measures the displacement of its plunger on a circular dial by means of a rotating point.
It works on the rack and pinion principal. The plunger has gear teeth cut on it and when it reciprocates it actuates a pinion attached to the pointer shaft. Thus any movement of the plunger causes a corresponding movement of the main pointer on a graduated dial.