Chargers for laptops typically have a voltage rating of 19 volts. Because chargers and batteries have different voltage ratings, the charger can charge the battery simultaneously while powering the laptop (if the voltages were the same, the charger could only power the laptop).