We recently responded to a page for a structure fire. On arrival we found the house full of acrid plastic smelling smoke. The home owner directed us to the clothes dryer which had smoke rising from behind it. We immediately shut off the electrical breaker, determined that their were no flames present, and pulled the dryer out from the wall. We used our Thermal imaging camera (TIC) to determine that no heat or flames was present in the wall itself.
The problem was caused by a fault in the plug. Possibly the copper conductors inside had been damaged at some point while removing it, possibly by pulling the plug out by the wire.
If any of those copper conducting wires attaching the plug to the cord are broken, the electricity flows through the fewer remaining wires, and the resistance caused by this reduced conductor size generates heat, which can build up and further damage the plug.
Eventually the heat becomes great enough that the plastic starts to melt and / or burn.
If you have a plug or electrical cord that you suspect may be too hot, have it inspected by a qualified person.