The hetero substituent can be a halogen (Cl, Br, I), a tosylate, a mesylate or a thiol group.
This reaction proceeds by removal of the leaving group X forming a carbocation as electron deficient center.
One of the adjacent alkyl groups then migrates to the positive carbon in a 1,2-shift.
Simultaneously with the shift, a pi bond forms from the oxygen to carbon, assisting in driving the migrating group off its position.
[1] In another definition all semipinacol rearrangements "share a common reactive species in which an electrophilic carbon center, including but not limited to carbocations, is vicinal to an oxygen-containing carbon and can drive the 1,2-migration of a C–C or C–H bond to terminate the process, generating a carbonyl group ".