Motor Effect
When a current carrying wire is placed in the magnetic field of a permanent magnet the magnetic field of the wire and of the permanent magnet interact and produce a resultant force. If the magnetic fields are parallel there is no resultant force, the force will be strongest when the fields are perpendicular
Electric Motor
If a loop of wire is placed in the magnetic field of permanent magnet the forces on each side will be acting in opposite directions as the current is flowing front-to-back on one side and back-to-front on the other. The forces produce a moment which causes the loop to rotate, once it reaches past 90 degrees the forces will start acting the other way forcing it to go back to the position of 90 degrees however if the current is reversed using a split ring commutator then the forces will alternate direction allowing it to keep rotating in the same direction