Denny's right, and don't get impatient and use the other end of the hammer, you'll misshape the small solenoid shell. Wooden handle, bare knuckles, completely non-metallic deadblow hammer (not even metallic caps on it).
Solenoid coil should have a fat cable on it that goes straight to the battery. The solenoid is supposed to "click" when you turn the key to start position, and release when you let go. Yours obviously never let go, kinetic shock with a wooden hammer handle or similar might make it come unstuck and kill power to the starter windings.
Doesn't really matter, you need to replace at least the solenoid itself, if not the starter/solenoid assembly as a unit. Once stuck once, always a risk. Can't risk the starter staying engaged while the motor's running if it sticks again. Best emergency move if it happens is to yank the spark plug wire off of the spark plug.