Aromatic nomenclature, when to use numbers or prefixes?
1,4-dimethylbenzene and p-xylene are both equally correct nomenclatures. You could also say 4-methyl toluene if you wanted. I personally prefer the first example because it allows me to visualize the molecule immediately.

As for 2,4-diiodonitrobenzene, this is indicating three substituents. You have the nitro group, and two iodo groups - one para to the nitro, and one ortho to the nitro.