I recently got to know about how the heat produced in a conductor. It's due to collision of electrons when drifting due to electric voltage But my question is Why doesn't a non current carrying conductor doesn't heat up due to collision of electrons in it as they are in random motion?
In the end the energy that is converted to heat has to come from somewhere. In the sketched situation the electron has to be in an excited electron state so that it can relax into an energetically lower lying state due to the scattering event. If there is no net current in the conductor the electronic system is in thermal equilibrium with its environment. The electrons fill up the available states in the conductor according to the Fermi distribution. This means that the scattering event you sketch is just as probable as the opposite, i.e., an electron in a lower lying state gets excited due to its surroundings. If there is a net current in the system we are in a non-equilibrium situation. Electrons have to be in an excited state to contribute to this net current. Now the scattering process in which the electron motion is turned into heat is more probable than the opposite.