The flywheel is a large metal drum with magnets attached along the inside rim.
How a Flywheel Works
The flywheel is usually connected to the crank, and rotates when the crank is turned (the crank is turned when you start a moped, as well as while the moped is running). The flywheel rotates around the stator plate, also sometimes called the magneto. Typically, ignition and lighting coils are located on the stator plate. These coils are literally coils of copper wire. The magnets rotating around these coils generates electricity due to electromagnetic induction. This electricity is what powers most electrical components on a moped if there is not a battery present in the electrical system.
To remove the flywheel, there are several techniques. First, there is a nut on the flywheel which must be removed. To do this, you must somehow prevent the flywheel from turning while you are trying to remove the nut. There are several ways to do this as well. You can use a piston stop, you can do the rope trick, or you can hold it with a chain, or strap wrench. Once you have stopped the motion of the flywheel, you can remove the nut.
However, once the flywheel nut is removed, you still must separate the flywheel from the taper on the crankshaft. You can do this by utilizing a special tool, called a flywheel puller, or you can try to knock it off using a rubber mallet as demonstrated in the link below.
Here's a video on YouTube showing how to remove a flywheel without the puller. For reviews of this method, please search the forums.