How to get my iphone 5 charger to work?

I plug my charger in an it vibrates saying it's chagrin then it stops then vibrates etc. Now it's not working at all. What do I do? I only have 16%

I had this on a older iphone in the end it turned out to be just the cable.
Try another lightning cable and if that doesn't solve the problem check there's no debre in the socket if not try restoring the device if still that does not fix it your ****** hope that you are still under warranty.