Materials to which magnets attracted are known as magnetic materials. Materials that don't attract magnets are called as non-magnetic material. In non-magnetic materials, the domains point in all directions and cancel each other out. In magnetic materials, all the domains point in one direction and their magnetic forces add up. Magnets attract mainly ferrous materials- those which contain iron.
Every magnet is surrounded by an invisible magnetic field, which is the space in which the force of its magnetism works. A pattern of imaginary lines provides a picture of this magnetic field. These lines of force show that the magnetic field is strong closest to the magnet but becomes weaker farther away. The power of a magnet is strongest at two points, called the poles, which are usually near the ends of a bar-shaped magnet. There are two poles, called "north pole" and "south pole". They are named after the poles of the Earth, to which they are attracted.
We should remember the common rule of a magnetic(and in magnetism)- Unlike poles attract each other and Like poles repel each other.