The difference between an inverter and a generator is that a generator is the device that actually generates the electricity needed.
Then the inverters job is to change DC electricity to alternating current.
So if you have a direct current or "DC" generator the inverter on the generator will change that current from DC to alternating current.
Or if you have an inverter plugged into the 12 volt outlet on your vehicle it will turn that 12 volt DC current into AC current or Alternating Current like your house uses.