Usually an 'overheated' battery is caused by destructive forces inside the battery....Here's the nuts & bolts of what's happening, most likely...
As a battery ages, and sulfate builds up on the internal battery grids (plates) to such an extent one or more POS and NEG grids have touched through the separator between them causing that 'cell' to have a direct 'short'...This same result can happen in a newer battery if the grid components fail due to charging abuse, vibration, etc...
Each cell in a
12 volt lead-acid battery produces about 2.2 volts, and therefore if you have one cell with a 'short', you now in effect have a 10 volt battery that your
12 volt charger is 'overcharging', resulting in the elevated temperature of the battery...
This type of situation should be corrected with all speed!...going for the understatement here...
An overheated battery will quickly evaporate it's electrolyte and generate lots of Hydrogen gas that can ignite (in the presence of any nearby spark) with a BIG BOOM to ruin your day and create a mess in the battery box!...Yikes!...
In addition, the charger continues to pump the amps into the damaged battery, possibly causing the charger to overheat and fail as well - especially if not noticed and allowed to run for an extended period...
The short version of this tale is to replace the failed battery as soon as possible...If the other battery is over 3 years old, it should also be replaced so you have a fresh 'pair' of batteries with similar capacities...
Matching a new battery with an older one can bring on unequal charging/discharging problems that will result in less than stellar battery life, to say the least...
Happy trails...