"Contact" means "touching". A contact force can't act on an object unless
they're touching. Friction is a contact force.
Gravitational forces pull masses together even if they're not touching.
Magnetic forces pull a piece of iron toward a magnet even if they're not touching.
Gravitational and magnetic forces are "non-contact" forces.