A faulty power supply or battery is a relatively common problem with laptops. Your first aim should be to try and determine which, if either, is at fault.