Charger Questions

i have bought a ac charger and it works fine but sometimes i leave it charging over night and i was wondering is it ok for the battery and does it just in a sense run off the charger? kinda by charging it as fast as it uses the battery