Capacitor and inductor power factor
For an inductor, how does the electron flow (current) lag behind the supply voltage?

In an inductor which has no magnetic field already established, the application of electricity initially sees an open circuit (little current flow.) As the magnetic field builds, the current also builds, and it eventually behaves like a solid conductor (full current flow.) So the current lags the supply voltage due to the delay in establishing the magnetic field.

(If you then instantly disconnect the inductor, the magnetic field will collapse in reverse as quickly as it can. With no resistance to slow it down, dv/dt dictates that the voltage will go exponentially high. This is called "inductive kickback" and can be problematic, even dangerous.)

For a capacitor, how does the electron flow (current) lead the voltage?

In a discharged capacitor, the potential (electric field) between the two plates is nothing, so no current flows. Application of any electricity initially sees a short circuit (full current flow.) As the plates start charging up, the current decreases, and eventually behaves like an open circuit (little current flow.) So the current leads the supply voltage due to the delay in establishing the electric field.

(If you then instantly disconnect the capacitor, the electric field remains static, like static electricity. It may remain there for years, ready to zap you, such as in older televisions and radios.)

The key similarity between the two is that it takes time for magnetic fields to build/collapse and plates to charge/discharge; this delay creates an imbalance between the voltage and current measured at each device... and we call the ratio of this "Power Factor."