There are two things that cause laptop chargers to get hot. One is if the battery used in your laptop charges really fast, this excess heat can escape through the charger and will end up generating more heat inside of it. Secondly, dust or debris can accumulate around the wires in your laptop charger which also causes it to get hot when you use them because they raise its temperature internally.
Since laptops typically charge with direct current (DC), there isn’t an outlet where excess electricity leaks out; instead, energy builds up inside of the machine until it needs to release itself by turning on for a few minutes (sometimes, depending on how often you charge).