In the US, generators under 5000 watts do not have to be wired like the house.
The neutral can 'float.' That is to say, it is not bonded to ground.
On generators over 5000 wattts, the neutral MUST be bonded so the generator can be hooked up to house mains safely. A floating neutral is safer for portable inverters and generators because you would have to contact two wires to complete a circuit, instead of just touching the hot wire while being grounded.
This means you should not ever hook up a small portable generator (or an inverter) to house wiring without checking first. On common 120 mains outlets, the wide slot on the plug is neutral, the narrow slot on the right is hot. On a floating neutral, neither side is really hot or cold. Unless you have a load connecting both sides, there is no circuit.
On house mains in the US, touching just the right side wire will shock you because that wire is live all the time. The neutral and ground are bonded either at the outlet or back at the power company transformer. 120 volts is made by center tapping the transformer. the center is neutral, either side is 120v, and across the two outside is 240v. The ground wire is really just an extra neutral wire, so if the first neutral fails, there is an easier way for the electricity to go back to the power company than through your body.
Hospitals have separate grounds for each outlet (isolated ground), most homes and businesses have the ground wires bonded to each other. Isolated grounding makes it less likely that an equipment malfunction will damage nearby equipment, but is more costly to do.
With a floating neutral, one side of the inverter or generator outlet goes to the exciter circuit. If you tried to bond that to ground it would probably destroy the inverter or generator.