There are two possible problems that cause Starter to do this. (Of course it does depend on the design of the starter as to exactly the following is done)Starters have a soliniod that allows the relatively small current
from the key to connect the very high current
from the battery
to starter. This is an electric/magnetic solinoid that has a very heavey copper ring and two contacts. The ring is slammed onto the contacts and links the high current to the starter. This contact arcs everytime it switches. A result is that is can get very dirty and needs a clean, it can etch away till it needs a clean and file, or it can wear away to the point where it no longer touches at all and needs replacing. The click you hear is the solinoid closing, but the high current switch is not making.the other possible is that the stater gear
is not meshing into the ring gear
on the flywheel. Some starters have the lower current magnetic solinoid throw the entire starter gear forward. As it is thrown forward, the high current switch is then engaged and the starter motor
turns. Two additionals to above can stop the motor spinning up. The solinoid does not have enough battery
current to throw the mechanism forward hard enough to engage the high current switch. or there is a fault stopping it traveling far enough forward. And the other is the starter gear is not meshing into the ring gear and it stops the mechanism traveling far enough forward. This later one can be checked by removing the starter and checking that the teeth on both are not damaged. They need to have a slight angle on the front edge so as the teeth slide past one another.