== and != are called comparison operators. They are used to compare two values and see whether they are the same (==) or check if they are different (!=). E.g.
if (gender=="Male") alert("You are a man.");
= is used to assign a value to a variable. E.g.
myFavouriteNumber=5;
To Sum it up…
An = sign is used to assign a value to a variable: e.g.
var a=3; a=5+2;
An == sign is used to compare if two values are equal e.g.
if (a==3) { alert("a is equal to 3"); } else { alert("a is not equal to 3"); }
A != sign is used to compare if two values are different e.g.
if (a!=3) { alert("a is not equal to 3"); } else { alert("a is equal to 3"); }