Every electric current has a magnetic field around it. Round a long straight wire the field lines are circles centred on the wire, and the right-hand grip rule gives their direction: thumb along the current, fingers curl with the field. Inside a long solenoid the field is strong and uniform, along the axis.
A current-carrying wire in a magnetic field feels a force at right angles to both the wire and the field. The force is greatest when the wire is at right angles to the field and zero when it is parallel to it.
Two parallel wires act on each other with equal and opposite forces: currents in the same direction attract, currents in opposite directions repel.