What is happening to the flow of electricity in a magneto when you shut off power in a lawn mower or plane?
"P-lead" is not an electrical engineering term. It appears to be exclusively a term used with aircraft magnetos. In electrical engineering, we would call the "p-lead" connection a short circuit. It provides a low resistance path that allows current to flow past an area where you want to prevent it from flowing. For an engine with a magneto connecting the "P-lead" forces the current from the magneto to flow around the spark plug and back to the magneto.

In electrical engineering, we try to reserve the word "ground" to refer to an electrical connection to the earth. The word "common" refers to a conductor or series of conductors that is connected to one side of the power supply and is usually connected to "ground" at just one point. In a vehicle, the "common" is often connected to all of the metal parts of the vehicle and sometimes called "ground." Since engine spark plugs have current conducted through an insulated piece to the spark gap, then across the gap as a spark to the part that is threaded into the engine block, the "P-lead" that prevents that spark provides a parallel path from the insulated part of the spark plug to the engine block. The engine block is the common point or "ground" for the magneto (power supply). With the "P-lead" connected, current generated by the magneto flows from the magneto coil through the high-voltage wire, through the "P-lead", through the metal parts of the engine, and back to the magneto. That forces the magneto voltage to nearly zero and prevents a spark across the spark gap.