So, my teacher was trying to explain me about Diamagnetic substances and he said that :
Suppose the atom of an element has 4 electrons revolving around the nucleus in 4 different orbits. The electrons will be revolving around the nucleus and also spinning about their own axis. So the net magnetic moment will be due to both the spinning and the revolutionary motion of the electrons around the nucleus. Now if the vector sum of the magnetic dipole moment of all the 4 electrons is zero then their Magnetic field will also be zero. And such substances are called Diamagnetic Substances.
The part that I couldn't understand was that how will the magnetic field be zero if the magnetic moment is zero. As far as I know as a Highschool student :
$$\vec{M} = i\vec{A} ~\text{or}~ \vec{M} = m\vec{l}_{eff}$$ where $i$ is the current, $\vec{A}$ is the area vector, $m$ is the pole strength, $\vec{l}_{eff}$ is the effective length between the two poles. And I know one relation between $\vec{B}$ (Magnetic field) and $\vec{M}$(Magnetic Dipole moment) which is that the torque experienced by a Magnetic Dipole :
$$\vec{\tau} = \vec{M} \times \vec{B}$$