Removing the flywheel nut requires restraining the crankshaft from rotating, or using a rattle gun. If the thread on the crankshaft is rusty, you need to wet it with Penetrene for a couple of hours first. Also, if there is rust, you need to get the Penetrene to soak in between the crankshaft and the center of the flywheel before you pull the flywheel off.

If there have been previous failed attempts to remove the flywheel nut, you may have a difficult process ahead of you. My method, for what it is worth, is to file the damaged nut so that a socket will fit on it tightly, bearing on all surfaces, then use a rattle gun. The advantage is that it gets the job done in a couple of seconds with no damage. Of course you then need a new flywheel nut when you reassemble the engine.

The flywheel can't be removed until the nut is removed.