A sine wave is naturally produced as the magnetic field saturates and collapses while the generator rotates.

You get a modified square wave with a 12v-120v inverter because it produces multiple short duration square wave signals and adds them together to approximate a sine wave.