"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.
Contact forces, like friction, require physical touch to act on an object, while non-contact forces, such as gravitational and magnetic forces, can exert influence without direct contact. Friction resists motion between two surfaces, while gravity and magnetism act over distances. Thus, the primary difference is the necessity of physical interaction for contact forces versus the capacity for distance interaction in non-contact forces.
;