good pic
what happens is you should turn the key and the solenoid (the smaller part attached to the starter) pulls in allowing the main connection on the alternator to make as well as moving the drive gears into mesh with the ring gear on the flywheel and it will turn the engine.
if all you hear is clicking its either there isn't enough power to turn the alternator once the solenoid has clicked in, or there is a bad connection somewhere. could just be the brushes are worn out inside the alternator or it needs a good clean. when the car was working ok, was it sluggish to turn over at all?
if you can prove its the alternator, easiest bet is to swap it out for a working one and keep the other as a spare to get rebuilt if needed at a later date.