There can be many causes.
It is most likely a problem with your battery, either it is not connecting properly or the battery itself is dead. Generally lithium ion batteries (most likely the type in your laptop) last for roughly 20,000 charge cycles before losing a considerable amount of their capacity. Depending on how often you use your laptop, the life span of the battery could range from 1-5 years.
If you end up replacing your battery, try not to keep it charging constantly. It is always good to let lithium ion batteries discharge at least half way once every so often, sometimes this can improve their lifespan.
I would also recommend the course of action that Laptop_Nerd has suggested as well. Only buy a new battery if you are...