The Apple power adapter/charging cord, can get quite warm when the laptop's battery is charging from a nearly depleted state, but neither should get so hot that you cannot comfortably touch them. This would be normal for these conditions.
It can also depend on the current ambient temperature conditions.
However, although rare, it may be possible that the adapter/cable is defective. If you are concerned, I suggest that you contact Apple Support directly for further advice on what the next steps should be ... should they become necessary. To reach them, simply select the "Support" link on the lower left-hand side of this forum's web page.