A flywheel is essentially a very heavy wheel that takes a lot of force to spin around. It might be a large-diameter wheel with spokes and a very heavy metal rim, or it could be a smaller-diameter cylinder made of something like a carbon-fiber composite. Either way, it's the kind of wheel you have to push really hard to set it spinning. Just as a flywheel needs lots of force to start it off, so it needs a lot of force to make it stop. As a result, when it's spinning at high speed, it tends to want to keep on spinning (we say it has a lot of angular momentum), which means it can store a great deal of kinetic energy. You can think of it as a kind of "mechanical battery," but it's storing energy in the form of movement (kinetic energy, in other words) rather than the energy stored in chemical form inside a traditional, electrical battery.
Flywheels come in all shapes and sizes. The laws of physics (explained briefly in the box below—but you can skip them if you're not interested or you know about them already) tell us that large diameter and heavy wheels store more energy than smaller and lighter wheels, while flywheels that spin faster store much more energy than ones that spin slower.
Modern flywheels are a bit different from the ones that were popular during the Industrial Revolution. Instead of wide and heavy steel wheels with even heavier steel rims, 21st-century flywheels tend to be more compact and made from carbon-fiber or composite materials, sometimes with steel rims, which work out perhaps a quarter as heavy.
The physics of flywheels
Things moving in a straight line have momentum (a kind of "power" of motion) and kinetic energy (energy of motion) because they have mass (how much "stuff" they contain) and velocity (how fast they're going). In the same way, rotating objects have kinetic energy because they have what's called a moment of inertia (how much "stuff" they're made from and how it's distributed) and an angular velocity (how fast they're rotating). Moment of inertia is the equivalent of mass for spinning objects, while angular velocity is like ordinary velocity only going round in a circle.
Just as the kinetic energy of an object moving in a straight line is given by this equation:
E = ½mv2
(where m is mass and v is velocity), so the equivalent, kinetic energy of a spinning object is given by this one:
E = ½Iω2
(where I is the moment of inertia and ω is the angular velocity).
"Moment of inertia" sounds horribly abstract and confusing, but it's much easier to understand than you might think. What it really means is that, from the viewpoint of kinetic energy and momentum, the effective mass of a spinning object depends not just on how much actual mass it has but on where that mass is located in relation to the point it's spinning around. The further from the center the mass is, the more effect it has on the object's momentum and kinetic energy—and we quantify that by saying the mass has a higher moment of inertia. So a large diameter, lightweight, spoked flywheel with a very heavy steel rim might have a higher moment of inertia than a much smaller, solid flywheel, because more of its mass is further from the point of rotation.
The laws of conservation of energy and conservation of momentum apply to spinning objects just as they apply to objects speeding in straight lines. So something that spins with a certain amount of energy and angular momentum (the spinning equivalent of ordinary, straight-line, linear momentum) keeps its angular momentum unless a force (such as friction or air resistance) steals it away. This law is called the conservation of angular momentum.
When a figure skater puts their arms out, some of their mass is further from the center of their body (the point of rotation) so they have a higher moment of inertia. If they're spinning quickly with their arms out but then suddenly bring their arms in to the center, they instantly reduce their moment of inertia. But the conservation of angular momentum says their total angular momentum must stay the same—and the only way that can happen is if they speed up. That's why a spinning figure skater will spin faster when they bring their arms in to their body (and slow down when they put their arms out again).
It follows on from these basic laws of physics that a flywheel will store more energy if it has either a higher moment of inertia (more mass or mass positioned further from its center) or if it spins at a higher speed. And since the kinetic energy of a spinning object (E in the equation above) is related to the square of its angular velocity (ω2), you can see that speed has a much bigger effect than moment of inertia. If you take a flywheel with a heavy metal rim and replace it with a rim that's twice as heavy (double its moment of inertia), it will store twice as much energy when it spins at the same speed. But if you take the original flywheel and spin it twice as fast (double its angular velocity), you'll quadruple how much energy it stores. That's why flywheel designers typically try to use high-speed wheels rather than massive ones. (Compact, high-speed flywheels are also much more practical in things like race cars, not least because large flywheels tend to add too much weight.)
The force on a flywheel increases with speed, and the energy a wheel can store is limited by the strength of the material from which it's made: spin a flywheel too fast and you'll eventually reach a point where the force is so great that it shatters the wheel into fragments. Strong, lightweight materials turn out to be the best for flywheels since they can spin fastest without breaking apart. Modern flywheels are typically constructed from materials such as alloys, carbon-fiber composites, ceramics, and crystalline materials such as single crystals of silicon. Some are specifically designed to shatter safely into tiny fragments if they spin too fast.