Could be starter, could be solenoid, could be slave solenoid. I would use your meter and test them all out.
First check the small wire on the solenoid (normally on the S terminal). You should have 12 volts here when key is in Start position. Should be no voltage when in On/Run position. If good then check voltage on Battery side of solenoid. Hook meter to post, not cable. Should show 12 volts here all the time, make sure it stays at 12 when you go to Start position. Then move over to the Start side of solenoid. Should be no voltage until in Start position. Then should be 12 volts like on battery side (again on post not cable). Then move down to the starter itself. Check at cable and post, should be 12 volts when it Start position only. If it is, you have a bad starter. If you do not get voltage but less than 12, you have a cable issue (bad connection proabably). If you fail further up at the solenoids (check them both too), then you have a solenoid issue.
They are pretty simple devices, just like a light switch really. Apply 12 volts to small trigger wire, they close up and pass voltage through. Remove 12 volts from trigger wire and they open up and no voltage passes through.
As for the hammer on the starter trick, if it is a bad starter, this can get it working again. Do NOT trust it though. Probably a dead spot on the armature and motor brushes are probably sitting right on that dead spot. A slight jolt "can" get you past that dead spot but the next time it stops on it again, no workie workie
__________________