This article shows the procedures on how to remove the detent pin under the headstock. 

Detent pin is a part which allows the user to lock the headstock in place when engaged. This part may get damaged due to various reasons but when the 

headstock is not locking into place it may be a issue associated with the detent pin.