If you hear a motor clicking it’s a sure sign that something is wrong. If it is the extruder motor that is clicking, check this chapter: [Filament not extruding properly]. For any other stepper clicking, continue here.
Explanation
Usually this is a hardware issue. Clicking means the motor is stalled, so that it is just twitching and not rotating. This will eventually ruin your print, leading to layer shifts or leaning prints.
How to fix
There is too much friction when the motor tries to move. Clean, lubricate smooth rods, lead-screws and check bearings.
Something may be blocking the movement of the axis in question. Check alignment and anything that could prevent the movement.
You’re trying to operate your motors at too high speeds (including acceleration/jerk settings), lower and try again.
Insufficient current may be being supplied to them (check Vref on the stepper driver for this axis).
The motor may have overheated, allow to cool and see if it happens again.