Park the mower on solid level ground and set the parking brake.
Lift the rear corner of the mower up and place it on a jack stand. This gets the wheel off the ground and stabilizes the mower. If you cannot lift the corner of the mower, use a jack.
Pull the cotter pin out of the castle nut located in the center of the wheel with pliers. the castle nut looks just like a regular nut except it has square grooves cut into the top edge so the cotter pin can keep the nut from spinning.
Loosen the nut with a socket and then take the nut off the wheel hub.
Pull the wheel off the wheel hub.