Try turning off the tablet and charging it when it is off. Does it work then?
You can also (if there is one on your particular tablet, it isn't on all) hit the reset (it is a little hole on the tablet) and see if it helps.
If not, it could be a few things, however I would start with the charging cord. Try either using another cord on your tablet and/or try yours on another device. If it charges with another cord, then yours probably needs replacing.
If neither of those resolve the issue, then before going further I have to ask, is the tablet under warranty still? If so, talk to your carrier or manufacturer to see if they have a fix for you or can replace the device. Better to go through them if it is under warranty than do something...