Besides bad cable connections and a bad ground, the problem is often the solenoid. The solenoid is an electro-mechanical switch.
To trouble shoot:
1) touch a light wire between the small terminal and the large terminal the cable from the battery
connects. If the starter works, then the problem is between the starter and control console. If the solenoid clicks but the starter doesn't turn, then it's either a bad motor or bad contacts inside the solenoid.
2) touch a screwdriver across the the 2 large terminals, sparks will fly. If the starter turns, then the problem is in the solenoid. If the starter doesn't turn then it's the motor.
Most auto parts
stores will test the starter for free.
Solenoids usually have a round copper disk that comes in contact with the posts of the 2 large contacts on the back of the solenoid. The disk turns a little each start so it lasts longer. Over time deep pits are burned in the disk and posts. Eventually there are enough burn spots that the solenoid doesn't make proper contact. Symptom is a loud click but no starter movement.On a later starting try contact may happen when the posts contact a less burned spot.
If you're handy, you can disassemble the solenoid and file out the pits in the posts and disk. Then the solenoid is as good as new.