A slotted nut features grooves on its head intended to align with a hole(s) in the bolt onto which it is threaded.
These holes commonly accept cotter pins, and, together with slotted nuts, ensure that assemblies do not separate and that machine settings are maintained.