If it happens at the same time as the string goes sharp or flat, it will be one of two things - slippage on the tuners, as @MatthewRead and @CornbreadNinja mentioned (you will be able to feel this if you hold a finger on the tuner while tightening or loosening the string - it will slightly jerk) - friction over the nut I have had one guitar which had a nut friction problem, solved by rubbing a pencil lead into the grooves in the nut next time I restrung it.