when to use $$, when to use [tex][/tex]
These are equivalent, with the latter being preferred.
and when to use [itex][/itex]
tex tags give you an equation on its own line [tex]a=b[/tex], (note the comma being pushed down to the next line) while itex tags produce an in line equation [itex]a=b[/itex], which doesn't interrupt the flow of the text.