Well it could be the battery or it could be the charger.
Try charging it when the laptop is off. If it will charge then, but won't when it is turned on, then it is most likely the charger that needs to be replaced.
If it won't charge either when the laptop is off or on, but the charger will run the laptop itself, then you probably need to replace the battery.