Voldemort,
Neutral wire is not the same as the grounding wire!.
(Also note there is a big difference between a ground
ing wire (green/yellow) and a ground
ed wire, which can be the neutral wire)
Never make that mistake in practice or you might be very sorry in some cases and have a very weird hairdo in other cases
--------------------
Colors depend on where you live and on what kind of system you're talking about (single phase/multi-phase).
It can be very different and even the opposite of what is used elsewhere (eg: blue, black, brown colors have a very different meaning in UK/EU as in US and even different between number of phases being used).
Although, global regulations should prevent that, there are still wrong colors being used.
However, when you have a red wire, it is always the live/hot wire.
The ground is always green or green/yellow. And white will always be a neutral wire.
--------------------
You should not swap neutral and live!
If you speak about low voltage lines (eg: 220V or 110V depending on where you live in the world) and about alternating voltage, then the difference between neutral and live is mostly safety.
It is correct that you can usually swap these when connecting your device. You're device will work nonetheless since we're talking alternating voltage here (that is for most devices; some devices do require the live and neutral wires to be connected properly.Not because they wouldn't work otherwise, but because there might otherwise be some interference or other grounding problems).
But there is a very big safety "however":
In Europe for example the live and neutral wires are often not fused (in the outlet itself). In the UK they often are. The wire that is fused is the live wire.
So if these wires are switched and the fuse blows, then there would still be current flowing to your device and you could get a shock if you would touch it.
Many switches for example only cut the live wire (single pole). Again, if they would cut the neutral wire then no electricity will flow to the light bulb, but if you happen to touch the live wire when you change the bulb you could get a nasty shock since it isn't cut and a electric potential would still flow and could occur between the wire, you and the wet floor you're standing on....
PS: This is also the reason why with some plugs the neutral leg is longer than the live leg (and the grounding is even longer) so that you connect the neutral first. For this very same reason some plugs in some parts of the world have a different shaped leg for live than for neutral, or you would only be able to put the plug in the socket in 1 way, etc.
(although the true reason why the live and neutral legs of a plug/socket are different is a bit of historical dodgyness and has todo with a light bulb which does not follow the regulations but is so common that it can't be banned or changed anymore)
PS: The neutral wire is often a grouded wire (not to be confused with the grounding wire which is green/yellow)!
-------
In short:
Neutral IS NOT the same as earth/grounding wire.
Live and neutral should never be switched because of safety reasons (eventhough your device will work nonetheless).
Colors vary (unfortunatly), but some are the same wherever you go.
Don't use the term "ground wire" as that is very confusing since a ground
ed wire can also be the neutral wire. Use the term "ground
ing wire" (or earth wire) when you refer to the green/yellow wire.