The two magnets when in close proximity experiences the force upon each other being applied by one another because of the electromagnetic field.
Step-by-step explanation:
The magnets have the property of electromagnetism which is induced by the particles of the magnet with the presence of electrons. The magnet have electromagnetic field around them which are stronger in close proximity and grows weaker as the distance increases.
So when the two magnets are in proximity experiences the force without actual contact between the two said magnets.