There is no difference in meaning. "Ej" is just more formal. You will see "ej" on signs and in more formal discussions. "Inte" is the most commonly used word.
There's also "icke". But it's rarely used on its own. "Icke" is used in compound nouns such as "ickevåld" which is "non-violence".
The ten commandments are usually phrased like this:
"Du skall icke stjäla" / "You shall not steal". ("skall" is btw also a very formal word not used that much anymore. Use "ska".)