Identify the case(s) in which magnetic force acts on the two bodies.
A magnet kept at a small distance from an iron rod
North pole of a magnet kept in touch with South pole of another magnet
North pole of a magnet kept at a small distance from the North pole of another magnet.
The magnetic force is a non-contact force. It acts on two magnetic objects in both cases, viz. when they are in contact as well as when they are not in contact.