A generator has two parts, the generator which makes electricity and the "prime mover" that turns the generator. Prime movers are usually gas or diesel engines but can be steam turbines, windmills, etc.