Passing an electric current through a wire produces a magnetic field around the wire, which can exert a force on the wire when placed in a magnetic field
Applying a current to a set of rails inside a horseshoe magnet, where a bar is placed on the rails which completes the circuit and generates a force that rolls the bar along the rails