Is there any potential associated with magnetism? Can anybody please tell me if magnetism is a conservative force or if there is a field associated with it? How to reason? One thing I know is that the work done by a magnetic force is equal to $0$.
 A: The force $q\vec v\times \vec B$ acting on a charged particle is clearly not conservative because it depends on the velocity. Conservative forces are those that integrate to a fixed work – energy difference that is independent of the path – between two points so they may only depend on the location. We can't associate a potential with a force that is velocity-dependent.
On the other hand, the magnetic force acting e.g. on a small piece of ferromagnet deserves a special discussion. If the magnet has magnetic moment $\vec m$, the energy of this magnet in an external magnetic field is simply
$$ U = -\vec m\cdot \vec B. $$
One may view this term in the energy as a potential energy that depends on the orientation of the magnet. This force is trying to orient $\vec m$ in the same direction as the external $\vec B$. Note that the field $\vec B$ above may depend on the position too, which is why a magnet that is already oriented to minimize the energy may be dragged to the region where the magnetic field gets stronger.
In general, whether or not $\vec B$ is the gradient of something depends on ${\rm curl}\, \vec B$ and this is governed by one of Maxwell's equations, namely
$$ \nabla \times \mathbf{B} = \mu_0\left(\mathbf{J} + \varepsilon_0 \frac{\partial \mathbf{E}} {\partial t} \right) .$$
It's called Ampère's circuital law (with Maxwell's correction: the last term with the time derivative – also known as displacement current). You see that the curl doesn't vanish in the presence of currents and/or time-dependent electric fields. However, in the absence of currents and time-varying electric fields, the curl is equal to zero, and you may write $\vec B$ as the gradient of a potential in these regions.
However, this doesn't immediately translate to the conservative character of any magnetic force because the magnetic forces we have measured aren't proportional to $\vec B$ as vectors. We would have $\vec F = c\vec B$ which would be analogous to the electric force acting on charges but such a form of the force only applies to magnetic monopoles, something that may exist in Nature but only in the form of extremely heavy elementary particles that we haven't observed yet.
So because $\vec F$ isn't $c\vec B$ for any known force, the question of whether $\vec B$ is a gradient of something has no impact on the question of whether a known force related to magnetism is conservative or not. For this reason, it isn't even too useful to consider potentials $\Phi_B$ such that $\vec B = -\nabla \Phi_B$ even though in some cases and regions, we could find such a potential (when the curl vanishes).
Instead, it is useful to write $\vec B = {\rm curl}\,\vec A$ where $\vec A$ is called the vector potential. As long as there are no magnetic monopoles, $\vec B$ may always be written in this way because the only obstruction that could prevent us from rewriting $\vec B$ in this way would be a nonzero ${\rm div}\,\vec B$ but this divergence vanishes due to a simple Maxwell's equation.
However, the vector potential $\vec A$ can't be "immediately" interpreted as the potential energy of a unit charge etc. Instead, it appears in the Lagrangian and the Hamiltonian (with various signs) in the combination $\vec j\cdot \vec A$ where $\vec j$ is the electric current. In this sense, the vector potential is the potential energy per unit current (both of them are vectors).
This is a bit formal description. In order to get the actual energy, one would have to integrate over the whole paths of the currents. And it may be done. For example, if you have a small loop of electric current, it behaves like a magnet (electromagnet) and the contour integral $\oint \vec{d\ell}\cdot \vec A$ of $\vec A$ over this loop is nothing else than $\vec B\cdot \vec{dS}$ – by Stokes' law – where $\vec{dS}$ is the infinitesimal area of the loop with the normal direction added to turn it into a vector (a right-hand rule is implicit here). So this tells you that the potential energy of the loop of current i.e. a small electromagnet is nothing else than the $-\vec m\cdot \vec B$ potential energy I mentioned at the beginning.
