If you look back through ancient issues of magazines like Popular Science, etc. you will note that electric engines have been popular hobby projects ever since electric sources became available to the public. Most were crude, being built with simple household tools, and often by people with limited skills, however they satisfied the desire to build something that would actually run.
Is it any wonder that I should want an example to include in my display. Of course I have to admit that mine, although very simple, is a more modern version. A piece of nylon was machined to wind the coil on. The steel piston slides very easily in the spool center hole. Although it can hardly be seen in the picture, it is equipped with a tiny Micro switch with a roller lever that rides against a cam on the crank shaft.
In operation the switch closes causing a magnetic field that draws the piston into the center. Just as it reaches center the switch opens and the magnet field collapses and the flywheel pulls the piston back out to where the switch closes and the cycle starts all over again.
If you are brand new at model making and would like to try making something easy----that works, perhaps this is an idea for you.