Richard Feynman explains “why” questions in general are asking for an explanation in terms of the familiar.
In case you missed the layman’s answer:
When you push your hand against a chair, contrary to how it seems to you, the atoms of your hand DO NOT come in contact with the atoms of the chair. The electrical forces repel the atoms WITHOUT ANY CONTACT (although the distance is so small you’d need a microscope to see the spaces between the atoms).
With magnets its the same, except that the distance is large enough to be seen without a microscope due to alignments of the contributing forces.