A current-carrying wire generates around it a circular magnetic field in a way described by the right hand rule. That is to say, if you had a wire pointing from the bottom to the top of this page, the magnetic field to the left of that wire would be coming out toward you, while on the right side of the wire that circling field would be heading into the page.
As a result, when you put two such parallel wires together, with current traveling in the same direction, those wires will attract. At the point at which their respective magnetic fields intersect, they are traveling in opposite directions, and opposites attract.
English doctor Peter Mark Roget devised a contraption in 1835 that exhibited this principle in action. Known both as a contracting helix and Roget’s spiral, the device is a type of primitive motor, akin to Faraday’s motor.
Take a look at it here: