Magnets attract materials by inducing magnetism in them; the material becomes a magnet as well.
The side of the material facing the magnet will become the opposite pole as the magnet.
Magnetic materials are called 'ferrous', and magnetism can be induced in them. Iron, cobalt and nickel are ferrous. Magnetic come in hard and soft varieties. Soft magnetic materials are easily magnetized and easily demagnetized. The best example is iron, which because of this property is commonly used in loudspeakers and electric locks. Hard magnetic material hard hard to magnetize and hard to demagnetize.
Hard magnetic materials, including many types of steel, can be used to make permanent magnets, which do not lose their magnetism easily when the inducing field is taken away.

The coercive force is a measure of the external inducing field need to induce a certain amount of residual magnetism, shown on the vertical axis. It is larger for the hard magnetic material.