Magnets influence each other. This influence is called magnetic force. The magnetic force can (unlike the force of gravity) either push the magnets apart (repulsion) or pull them together (attraction). This force is exerted up to a certain distance. To describe the magnetization direction of a magnet, the ends of magnets are named north and south poles.
Quick and easy experiment for qualitatively understanding of magnetic phenomena