Over heating usually the battery, a component that is damaged, or the cord.
If you haven't had it long, and/or it is still under warranty, I would suggest contacting the manufacturer or the place you purchased it from.
If, it is in fact out of warranty, you can still try and get it fixed with the manufacturer, but then there would definitely be a cost. You could also try a local tech.
If you feel comfortable trying to do the repairs yourself, you can start first with the cord, and see if it overheats using a different one. If it does, then the next thing I would try is replacing the battery. It is a bit more complicated that doing so on most phones, as tablets are not made to easily open, but it is actually something you can do yourself. This, more thank likely, is what cause the problem.
However, since it did get to overheated, it is possible that something else was damaged inside because of the heat. Hopefully not, but that is something you should keep in mind.