It sounds like the battery has reached the end of it's life and can no longer hold a charge. If the laptop works fine as long as it's plugged in to a power-point, getting a new battery should fix the battery issue.
Note: How well you look after a battery can greatly affect how long it will last before it becomes useless and has to be replaced.