It could be a few things, but most likely it is either the charging cord or the battery. If it is the cord that isn't working you can just replace it. If it is the battery then it is up to you if you want to attempt replacing it, or get a tech to do it.
NOTE: If the tablet is still under warranty, then you should contact the manufacturer about repairing or replacing it.