A differential transformer is an electrical device used to measure small changes in position, displacement, or vibration. It consists of a primary winding, a secondary winding, and a movable core that can slide within the windings, allowing for precise measurement of relative motion between the core and the windings.