The starter solenoid on a riding lawnmower is essentially an electromagnetic switch. This switch closes when you turn the ignition key, allowing electricity to flow to the starter. Once the engine has started and you release the key, the solenoid switch opens up, disengaging the electricity flow to the starter yet allowing the engine to run normally. In all respects, a starter solenoid is the key component between the ignition and the starter, without which a key starting system would not be practical on a riding lawnmower.
If your riding mower starter does not spin when you turn the ignition key, test the solenoid.
The solenoid is a small black box directly connected to the battery by a red wire. Find that wire, and trace it to the solenoid.
Two large posts are on a solenoid. The red wire is attached to one, and right next to that post, a wire is leading off to the starter. These posts will be directly in line.
Bridge the gap between the posts with your insulated screwdriver. If the starter spins when you make contact, the solenoid is bad; if the starter does not spin, the starter is bad.
Many times you can lightly tap a solenoid with a rubber mallet to make it work. This method will get the solenoid to function correctly several times, but eventually even tapping on the solenoid will have no effect, and you will need to replace it.
An insulated screwdriver is the best way to avoid a shock when bridging the electricity across the solenoid post. If you do not have an insulated screwdriver, wear a heavy pair of rubber gloves and use a regular screwdriver.