Your device settings options may vary, but functions remain the same.
Plug the charging cord into the phone.
Plug the charger cord into the charger.
Plug the charger into the power outlet on the wall.
Go to recent apps (square user button)
Clear all recent apps.
Goto:
Settings
Battery
You should see here if the phone is charging or not charging, and a percentage of charge along with an approximation of time left before full charge.
Also, and in your case this is very important, notice whether it is saying 'Charging On AC' or 'Charging On USB'.
If it is 'Charging On AC' then good.
If it says 'Charging On USB', then you have a problem.
Leave everything as is and change the charging cord with another, using the same charger.
Notice if it changes what it states the charge is coming from (AC or USB).
AC is what it should say if it is connected to a charger in the wall.
If you are plugged in like this and it says 'USB', a bad cord is usually the issue in my experience.
USB is a slow charge, that it would get if it was plugged into a laptop or other computer for charging.
This slow charge can be too small to allow for use and charging at the same time.
Some cords are actually not capable of carrying a suitable current for the phone to know that it is actually plugged into the wall.
Some cords get damaged over time, with the same results.
So check your cord.
There are apps available (some phones have this feature) to allow you to see how many milliamps of current are being delivered/used at any moment.