How does solar electric propulsion (ion propulsion) work?

Could ion propulsion work on Earth or does it work only in space?

Basically, propulsion works by throwing stuff, usually hot gases, out of the back of something like a rocket or jet airplane that you are trying to speed up. The thrust, or how much something is pushing you, is equal to the amount of stuff you are throwing out the back multiplied by how fast you are throwing those things. This is more simply known as:

Force = Mass x Acceleration

The difference between ion propulsion and conventional propulsion is that in ion propulsion you are throwing little tiny amounts of stuff out the back at very high speeds but in conventional propulsion you are throwing huge amounts of stuff out the back at a slower speed.

Ion rocket:

Force = little tiny mass x BIG ACCELERATION

Normal rocket:

Force = HUGE MASS x less acceleration

Does that fact alone stop us from using ion propulsion on Earth? No, because you can speed up (accelerate) the little mass enough to produce enough force. The problem of getting a rocket into space is a different problem which engineers call power density. Power density is the amount of power an engine has divided by the weight of the engine. For example, the space shuttle's main engines have a power density of about 70 lbf/lb (70 pounds of force per pound) which means that for each pound of the engine it can lift 70 times its weight. On the other hand, the entire ion propulsion in DS1 can produce 92 mN of force which is "roughly" equivalent to the pulling power of a large beetle, like a cockroach, and DS1 weighs 489.5 kg. This is much less than 1 lbf/lb!

The reason why ion engines work in space is because of two reasons: there is no friction in the vacuum of space to cause resistance and being far from planets limits the influence of gravity. Because there is no friction then the small continuous pushes over long times will eventually speed up the ship. Gravity, which does exist in space, doesn't work to slow or stop the ship in the way it would on Earth.

Could NASA use Ion propulsion to get a space craft into space?
How does DS1's engine work?
How did DS1 get into space?
What is gravity?
Is there gravity in space?

Is there anything resisting movement for DS1 in Space?
What is resistance?
What is inertia?