explain how work done against friction changes into heat energy?
Force of friction is the horizontal component of contact force acting between two bodies in contact. Contact force arises from weak bonds existing between the atoms present in the surface of the bodies in contact.
When work is done against this force it leads to continuous breaking of weak bonds existing between two bodies in contact. This in turn results in energy to vibrate the atoms present in the surface. This vibrating KE of the atoms appear as heat.