current carrying coil changes its shape to a circle in a uniform magnetic field When the coil is placed in magnetic field, it changes its shape to circle.
How does it change automatically?
 A: $$dF = id\vec{l}\times \vec{B} \tag{1}$$
where $i$ is the current, $d\vec{l}$ is a small element of the wire whose direction is along $i$ and $\vec{B}$ is the direction of magnetic field.
The force acting on a differential element of the wire is always perpendicular to the current $i$ and to the $\vec{B}$.
As the area vector of the coil is parallel to the direction of the magnetic field, $d\vec{l}$ and $\vec{B}$ are always perpendicular. Using this fact, the equation $(1)$ simplifies to,
$$dF = iBdl \tag{2}$$
The above equation tells us that the force on every part of the wire is equal.
Using equation $(1)$ and $(2)$, you can conclude that the force acting on the elements of the wire are equal and perpendicular to the wire element.

The forces acting on the wire try to stretch it. The wire exerts a force trying to prevent stretching. At one point, the anti-stretching forces of the wire equal to the magnetic force on the wire. A circle is a stable solution.

A: I have a one liner explanation if you know that the potential energy of a magnetic dipole having dipole moment $\vec \mu$ placed is a magnetic field $\vec B$ is given by $U= - (\vec \mu \cdot \vec B)$. Now, a free system always tries to attain the minimum potential energy, which is clearly attained when $|\vec \mu \cdot \vec B|$ is maximised. Thus, if we have a random shaped non rigid closed loop of current in a magnetic field, it will TURN so as to make its dipole moment vector parallel to the magnetic field vector, that is make
$\vec \mu \cdot \vec B = |\vec \mu|.|\vec B|$
Now this quanity will be maximised if $|\vec \mu|$ is maximised, which, for a constant current carrying loop, occurs when the area of the loop is maximum. When does that happen? :)
And there you have your reason for the shape, from a 'energy consideration' point of view.
