Faster or more charging requires more power and therefore more heat is produced. If your phone is at 20% and you charge it, it will be charged at a higher rate than if you were charging it at 90%.
If you have an inductive charger, a wireless charger, those heat up due to the nature of their design when in use.
Edit: Don't rule out malfunction as the cause. The charger, cable, or phone could be creating an unsafe operating state.