Dell Inspiron Laptop Plugged but not Charging

Hi,
I need some advice about my friend's Dell Inspiron Laptop not charging. I have a new battery installed and for some reasons at times it appears to charge and at other times it's not charging. At this time the computer is on/plugged in and when I click the battery icon on the bottom task bar icon it states "22% available (plugged in, not charging)". I had the computer shut off, but plugged in and it didn't charge the battery. Any ideas as to where to start looking?
Thank you.
