If your solenoid clicks when the key is turned to the crank position, the safety switches are OK. With a safety switch out of position, there will be no power to the solenoid, and no click.
First, make sure that the starter and battery connections are clean and tight. With a voltmeter, take a voltage reading at the starter while attempting to crank. Cranking voltage should be above 9.6 volts. If the voltage measures 12 volts and all you get is the click, the starter is bad.
In most cases, a starter that won't run will need the brushes replaced. This is much cheaper than replacing the starter.