To the uninitiated, electricity might seem like a sort of hidden magic. It plays by laws of physics we can’t necessarily perceive with our eyes.

But most of our lives run on electricity. Anyone who has ever lived through a power outage knows how inconvenient it is. On a broader level, it’s hard to understate just how vital the flow of electricity is to powering the functions of modern society.

“If I lose electricity, I lose telecommunications. I lose the financial sector. I lose water treatment. I can’t milk the cows. I can’t refrigerate food,” says Mark Petri, an electrical grid researcher at Argonne National Laboratory in Illinois. 

[Related: How to save electricity this summer]

Which makes it all the more important to know how electricity works, where it comes from, and how it gets to our homes.

How does electricity work?

The universe as we know it is governed by four fundamental forces: the strong nuclear force (which holds subatomic particles together inside atoms), the weak nuclear force (which guides some types of radioactivity), gravity, and electromagnetism (which governs the intrinsically linked concepts of electricity and magnetism). 

One of electromagnetism’s key tenets is that the subatomic particles that make up the cosmos can have either a positive or negative charge. To use them as a form of energy, we have to make them flow as electric current. The electricity we have on Earth is mostly from the movement of negatively charged electrons. 

But it takes more than a charge to keep electrons flowing. The particles don’t travel far before they run into an obstacle, such as a neighboring atom. That means electricity needs a material whose atoms have loose electrons, which can be knocked away to keep the current going. This type of material is known as a conductor. Most metals have conductive qualities, such as the copper that forms a lot of electrical wires.

Other materials, called insulators, have far more tightly bound electrons that aren’t easily pushed around. The plastic that coats most wires is an insulator, which is why you don’t get a nasty shock when you touch a cord or plug.

Some scientists and engineers think of electricity as a bit like water streaming through a pipe. The volume of water passing through a pipe section at a given time compares to the number of electrons flowing through a particular strand of wire, which scientists measure in amps. The water pressure that helps to push the fluid through is like the electrical voltage. When you multiply amps by volts, you compute the power or the amount of energy passing through the wire every second, which electricians measure in watts. The wattage of your microwave, then, is approximately the amount of electrical energy it uses per second.

How electrons carry voltage through wires

Based on the law of electromagnetism, if a wire is caught in a magnetic field and that magnetic field shifts, it induces an electric current in the wire. This is why most of the world’s electricity is born from generators, which are typically rotating magnetic apparatuses. As a generator spins, it sends electricity shooting through a wire coiled around it.

[Related: The best electric generators for your home]

Powering a whole city calls for a colossal generator, potentially the size of a building. But it takes energy to make energy from that generator. In most fossil fuel and nuclear plants, the fuel source boils water into steam, which causes turbines to spin their respective generators. Hydro and wind generators take advantage of nature’s own motion, redirecting water or gusts of wind to do the spinning. Solar panels, meanwhile, work differently because they don’t need moving magnets at all. When light strikes a solar cell, it excites the electrons within the atoms of the material, causing them to flow out in a current.

It’s easier to transfer energy with lots of volts and fewer amps. As such, long-distance power lines use thousands of volts to carry electricity away from power plants. That’s far too high for most buildings, so power grids rely on substations to lower the voltage for regular outlets and home electronics. North American buildings typically set their voltage to 120 volts; most of the rest of the world uses between 220 and 240 volts.

Current also doesn’t flow one way—instead, it constantly switches direction back and forth, which engineers call alternating current. This enables it to travel stretches of up to several thousands of miles. North American wires flip from one current direction to the other 60 times every second. In other parts of the globe, particularly in Europe and Africa, they alternate back and forth 50 times every second.

That brings the current to your building’s breaker box. But how does that power actually get to your electronic devices? 

[Related: Why you need an uninterruptible power supply]

To keep a continuous flow of electricity, a system needs a complete circuit. Buildings everywhere are wired with incomplete circuits. A two-hole socket contains one “live” wire and one “neutral” wire. When you plug in a lamp, kitchen appliance, or phone charger, you’re completing that circuit, allowing electricity to flow from the live wire, through the device, and back through the neutral wire to deliver energy. 

Put another way, if you stick a finger into a live socket, you’re temporarily completing the circuit with your body (somewhat painfully).

An electrical worker suspended on high-voltage power lines in China against the sunset
An electrician carries out maintenance work on electric wires of a high-voltage power line project on September 28, 2022, in Lianyungang, China. Geng Yuhe / VCG via Getty Images

The future of electricity

Not long ago, electricity was still a luxury. In the late 1990s, nearly one-third of the world’s population lived in homes without electrical access. We’ve since cut that proportion by more than half—but nearly a billion people, mainly concentrated in sub-Saharan Africa, still don’t have a current.

Historically, almost all electricity started at large power plants and ended at homes and businesses. But the transition to renewable energy is altering that process. On average, solar and wind farms are smaller than hulking coal plants and dams. On rainy and calm days, giant batteries can back them up with stored power.

“What we have been seeing, and what we can expect to see in the future, is a major evolution of the grid,” says Petri.

[Related: Why hasn’t Henry Ford’s power grid become a reality?]

The infrastructure we build around electricity makes a difference, both for the health of the planet and people. In 2020, only 39 percent of the world’s electricity came from clean sources like nuclear and hydro, compared to CO2-emitting fossil fuels.

Fortunately, there is plenty of reason for optimism. By some accounts, solar power is now the cheapest energy source in human history, with wind power not far behind. Moreover, a growing number of utility users are installing rooftop solar panels, solar generators, heat pumps, and the like. “People’s homes are not just taking power from the grid,” says Petri. “They’re putting power back on the grid. It’s a much more complex system.”

The laws of electricity don’t change depending on where we choose to draw our current from. But the consequences of our decisions on how to use that power do matter.