remove the top engine cover, locate the ignition coil, there is a small black wire going to the coil, that is the kill wire, which kills spark when you turn the key off or if you leave the seat while mowing.
if the mower still runs funny with that wire unplugged, it's probably not a safety/electrical issue.
out of gas perhaps?