With regard to a generator, "dirty electricity" usually refers to the quality of the AC power coming out of the generator. When I first heard the term, I thought you were referring to "dirty" vs "clean" electricity in the environmental sense, but now I don't.
AC energy should be a perfect sine wave. The AC energy coming out of a conventional generator is usually not a perfect sine wave, for various reasons, including the quality of the stator/rotor (consistency of the windings, for example) and the quality of the governor on the engine (can it run at a perfect 3600 RPMs, or does it vary slightly). This is because conventional generators simply consist of a motor that drives a rotor that spins in a stator. So there is basically no fancy cleaning or regulation of the AC output. The engine is tuned at the factory to spin at 3600 RPMs, which causes it to output 120-volt / 60 Hz power, which is then sent out to the breakers and receptacles.
An alternative to conventional generators is "inverter" generators. These generators output three-phase AC from the stator/rotor, which is then rectified to DC, which is then converted back to AC by an inverter. They put out near-perfect waveforms and are much more fuel-efficient and quiet than conventional generators, but they're also much more expensive.
For perspective, here is the output of two different conventional generators:
Notice that one is cleaner than the other, but neither is perfect. Here is the output of an inverter generator, for comparison. This is also comparable to what you would see coming out of your wall, from the utility:
Now, you will hear people talk all day long about how "dirty power" from conventional generators damages "sensitive electronics" like computers. I think these claims deserve some skepticism. For one thing, modern computers all have switching power supplies, and have for the last ten years or so. This means that the first thing the power supply does is convert the incoming electricity to DC, then convert it to high-frequency AC, then convert it to whatever form the appliance needs. This means that these devices are very tolerant of incoming signal that is not quite in spec. Devices with analog PSUs might have more problems with out-of-spec power, and might be more likely to be damaged.
But wait! I have done a substantial amount of research on this topic (although I'm just some guy) and anecdotally speaking, here is what I have found. In nearly every case I have found where a person claims that a generator damaged their equipment, they were overloading their generator. If you're overloading your generator, then the voltage is going to drop, and consistent low-voltage conditions WILL damage all electronic equipment that is attached to them.
This is why I'm very skeptical of the "sensitive electronics / dirty power" claim. You never hear the people making this claim tell you that modern "sensitive electronics" have switching PSUs that probably aren't going to be damaged by "dirty power". So it just makes me wonder what else they don't know or aren't telling me. And then you do some research and find out that all these people who are blaming their generators' "dirty power" on destroying their equipment were overloading their generator. Guess what? It doesn't matter if you're using an inverter generator or a conventional one, if you overload the genny, you're going to get low voltage conditions.