This is addition to Paulster's answer.
Here's an animation

The disc in Grey is the flywheel
Wikipedia provides a good general outline -
A flywheel is a rotating mechanical device that is used to store rotational energy. ...
- Providing continuous energy when the energy source is discontinuous. For example, flywheels are used in reciprocating engines because the energy source, torque from the engine, is intermittent.
- Delivering energy at rates beyond the ability of a continuous energy source. This is achieved by collecting energy in the flywheel over time and then releasing the energy quickly, at rates that exceed the abilities of the energy source.
- Controlling the orientation of a mechanical system. In such applications, the angular momentum of a flywheel is purposely transferred as a torque to the attaching mechanical system when energy is transferred to or from the flywheel, thereby causing the attaching system to rotate into some desired position.
In our case , point 1 serves more to make the engine operation smooth by minimizing crankshaft acceleration/decelerations between cylinder firings when in NEUTRAL.
Point 2. is utilized in Mechanical Kinetic Energy Recovery Systems
Consequences of high MI
- Slower Engine Response- when disconnected from the transmission. (slower for shifting gears for professional cases)
- Is an additional rotational mass to accelerate when connected to the transmission.
The specification of the flywheel depend on all sorts of things like engine design, number of cylinders (with more, the power stroke is more evenly divided), RPM of operation etc.
It also depends on use cases, eg , like in racing, it could virtually be done away with as minimal time is spent with the vehicle stationary and in between gears.