Speed Is About Power
How fast a phone charges depends on a single basic question: how much energy can flow into the battery per second. That figure is measured in watts. A slow old charger might push only a few watts into the phone. A modern fast charger can push tens of watts, sometimes a hundred or more. The battery has not changed size — the device is simply able to safely take in much more power at once.
How More Power Is Delivered
To push more watts in, modern systems play with two values: voltage and current. By raising the voltage at which power flows, or increasing the current, or both together, the charger can deliver more energy in the same amount of time. To do this safely, modern phones and chargers actually talk to each other. The phone says how much power it is currently able to handle, and the charger answers by adjusting what it delivers. A common standard for this conversation is USB Power Delivery.
A Conversation Between Charger and Phone
This handshake is the key to fast charging being safe. Both sides have to agree before higher voltages are used. If the cable, the charger, or the phone is not ready, the system simply falls back to a slower, safer level. That is why a modern phone plugged into an old basic charger still charges, but slowly — and why a high-power charger plugged into an older phone does not damage it. The two negotiate the highest safe setting they both support.
Fast at the Start, Slower at the End
You may have noticed that a nearly empty phone seems to fill very quickly at first, then slows as it approaches full. This is by design. When the battery is low, it can safely accept a high rate of charging. As it fills up, the phone gradually reduces the power going in. This protects the battery from stress and helps it last longer. The last stretch from around 80 percent to 100 percent is intentionally the slowest part.
Heat Is the Real Limit
There is one constant enemy of fast charging: heat. Pushing more power into a small battery always produces some heat as a byproduct. Too much heat is dangerous and wears the battery out faster. To manage this, phones constantly monitor their own temperature. If they get too warm, they automatically slow charging down. So a phone that is hot, in a thick case, or sitting in direct sunlight may charge more slowly than the same phone in a cool room — even with the same charger.
Source
This article was written using information from Wikipedia.