Quick Answer: A magnet attracts a steel paperclip because it can turn the iron in the clip into a temporary magnet. Atoms in iron act like tiny magnets that can point the same way. Nickel and cobalt behave much like iron. Wood, glass, and plastic respond too weakly for you to feel a pull.

The science behind magnetism

A magnetic field can exert a force across a gap. An electric current in a wire creates such a field. So do the electrons inside a magnet. A compass needle turns to follow the field. Outside a bar magnet, the field curves from its north pole toward its south pole. (HyperPhysics)

Magnetic materials

Iron, nickel, and cobalt are ferromagnetic at room temperature. In iron, neighboring atoms line up like tiny compass needles in patches called domains. In an ordinary steel paperclip, the domains point in different directions, so their fields mostly cancel. (National MagLab)

Bring a magnet close, and domains pointing along its field grow at the expense of others. The end of the clip nearest the magnet becomes an opposite pole. The clip jumps toward the magnet. (LibreTexts Physics)

Why other materials don't respond

Try the same magnet on aluminum foil or a piece of copper wire. Neither metal has domains like those in iron. Aluminum feels a slight pull, and copper feels a slight push. Both forces are too weak for a fridge magnet to move either object under ordinary conditions. (LibreTexts Physics)

Poles and fields

A paperclip clings most strongly near the poles at the ends of a bar magnet. Bring two north poles together and they repel each other. Turn one magnet around and the north and south poles attract. If a bar magnet breaks in half, each piece has its own north and south pole.

Heat, treatment, and magnetism

A hard knock can weaken a magnet by shifting its domains out of alignment. Above iron's Curie temperature, heat disrupts the magnetic order even within each domain. As the iron cools below that temperature, domains form again without an external field. The iron is ferromagnetic again, so a magnet can once more attract it strongly. For the whole piece to act as a magnet on its own, a field must leave enough domains pointing the same way. (National MagLab)

Applications of magnetism

In everyday life

A fridge magnet holds a photo against a steel door. Magnetic clasps keep bags and necklaces closed. A card reader can detect the pattern of magnetization in the stripe on a credit card.

In technology and industry

A hard drive writes data by changing the magnetization of tiny regions on a disk. Inside a speaker, a magnet and a coil push the cone back and forth to make sound. Magnetic forces also turn electric motors and lift scrap steel at recycling plants. MRI scanners use strong magnetic fields to make images of the body.

In scientific research

Scientists study how materials respond to magnetic fields for clues about how their atoms are arranged. In particle accelerators, magnets bend beams of charged particles around curves.

The bottom line

Steel and aluminum are both metals. A fridge magnet can line up domains in the paperclip's steel. That is why it picks up the clip and leaves the foil behind.

Sources & further reading

That’s the mechanism. The wonder is still allowed.