First you need to make sure the cord is OK. Try using a different cord to charge the tablet, or try your cord on another device.
Next check to make sure the power button isn't stuck. Depress the button for 20-30seconds and then plug it in to see if it will charge. If it shows as charging, be sure to leave it that way for a few hours.
If the cord is fine and the button isn't stuck, then that leaves either the battery, the port, or the phone is needing replacing.
In any of those case, I would say make sure the device is not still under warranty first. If it is, then contact the manufacturer and see if they can help repair or replace it. If it isn't under warranty, then you have the option of trying to replace the battery and/or port yourself (there are tons of how to videos out there) or taking the tablet to a local tech or repair place and get them to fix it.
Lastly, if none of those options is feasible, then you may need to get a new tablet.