On the surface fixed gear (fixie) and single speed bikes are very similar. They both have a single front chainring and rear cog meaning they essentially only have one gear.
So what is the difference?
Single speed bikes are fitted with a freewheel, whereas fixed gear bikes are not. On a fixie the rear cog is joined with the rear hub meaning when the wheel turns the cog will turn, too.
What does that mean?
It means that on a single speed bike when you stop pedalling the back wheel will continue to turn but the cranks (pedal arms) will not.
On a fixed gear bike if you stop pedalling the cranks will continue to move round. This means that you are essentially always pedalling on a fixed gear bike with no way to coast. On a fixie you can actually brake by preventing the pedals from moving. This locks the rear wheel in the same way the brakes on a normal bike do.
Do they both have brakes?
Single speed bikes will have brakes in the same way you would find on any normal geared bike.
Fixies are mixed. Some do not have brakes fitted at all relying on road position, rider skill and stopping the cranks to brake. Some are fitted with a single brake, usually on the front as the back brake is the wheel itself. It must be pointed out that riding a fixie without a front break on the road is illegal in the UK.
Why would I buy one?
Single speeds are ideal commuter or winter bikes as the lack of complex gearing makes them far easier to maintain. In contrast, the most common use of fixed gear bikes is on the track. Most of the bikes you see speeding around the velodromes are fixed gears with no brakes. They have also become commonly used as city bikes, but are rarely seen out on country roads.
What does a freewheel do?
A freewheel is similar to a ratchet. This means it will allow movement in one direction freely, but will stop the movement if it it reverses.
This can be done a number of ways but will normally involve a series of grooves which angle upwards and then sharply back down. This allows a tooth to run along the top of the grooves. If the motion is reversed it will get stuck up against the vertical side preventing movement.
When you apply pressure to the pedals/cranks the teeth are engaged to push the wheel around. If you pedal backwards nothing happens because the tooth just runs over the top of the grooves. Exactly the same happens when you stop pedalling as the outside of the free hub continues to move whilst the inside stays static.
If you want a better explanation of freewheels have a look here.