A wire carrying a current has a magnetic field around it. When the wire is placed in the field of a magnet, the two fields interact and a force acts on the wire. This is called the motor effect. In the jumping wire demonstration, a wire hangs between the poles of a magnet. When the current is switched on, the wire jumps up or down.
The force is largest when the wire is at right angles to the magnetic field, and it is zero when the wire is parallel to the field. Reversing the current reverses the direction of the force. Swapping the poles of the magnet also reverses it. A larger current or a stronger magnet gives a larger force.
The magnet and the wire exert a force on one another. The wire feels a force from the magnet, and the magnet feels an equal and opposite force from the wire. The magnet is usually clamped in place, so only the wire is seen to move.