The torque on a current loop is given by:
t = IA ´ B
We can define something called the magnetic dipole moment, m:
For a single loop, m = IA
For a coil with N turns, m = NIA
The torque is then given by:
t = m ´ B
A loop, or coil, in a uniform magnetic field has a potential energy given by:
U = -m · B