Heat Is Built In
Modern phones pack billions of tiny components into a thin slab of glass and metal. Whenever electricity moves through those components, a little of its energy escapes as heat. This is not a bug. It is a basic fact of how electrical circuits work, and engineers design phones knowing it will happen.
Joule Heating in the Chips
The physical effect behind this is called Joule heating, or resistive heating. As current passes through any material with resistance, some of the energy is converted into heat. Inside a phone, the processor, the screen driver, the radio chips, and the battery itself all generate heat as they do their jobs. When you are scrolling through messages, only a small amount is produced. When you are gaming, recording video, or running navigation, those same parts are pushed much harder, and the amount of heat goes up sharply.
Other Sources of Warmth
Heavy software is not the only thing that warms a phone. Fast charging pushes a lot of energy into the battery in a short time, and some of that becomes heat as well. Direct sunlight or a hot car can warm the device from the outside, on top of whatever it is generating internally. A phone in a thick case has a harder time letting heat escape, so the same workload can feel hotter than it would on a bare phone.
How Phones Manage the Heat
Phones are built with quiet ways to handle heat. Metal frames and graphite layers spread it across the body so no single spot becomes dangerously hot. The software watches the temperature and, if things get too warm, it begins to slow down certain components. This is called thermal throttling. You may notice the phone becoming a little less responsive, or the camera refusing to record long videos. That is the device protecting itself by deliberately doing less work.
A Quiet Cost
There is one more thing worth knowing. Heat does not just affect performance in the moment. Sustained high temperatures gradually wear down the battery, speeding up the chemical aging that makes older phones drain faster. So a phone that runs hot a lot is also a phone whose battery will tire out a little sooner.
Source
This article was written using information from Wikipedia.