No they do not, the only thing that has to touch is the magnetic field, as long as they are close to one another and their magnetic fields are in the same proximity they will experience a magnetic force.
Do magnets have to touch each other in order to experience magnetic force?
No! The magnets have two different poles that attract or repel forming a magnetic field around them. Magnetic attraction occurs just when their poles are different and attract, now the magnetic repulsion occurs when the two poles of the magnets are equal, so they need not touch each other to experience the magnetic force, since the magnetic force exists with the repulsion of them.
I Hope this helps, greetings ... Dexteright02! =)