People charge their devices every day without thinking about what happens inside the battery. It is a complex electrochemical system, with reactions and a flow of electrons that power the device.
Capacity describes how much charge a battery can hold and is often quoted in milliamp-hours (mAh). Like a larger tank in a car, higher capacity can give you more time between stops. As the battery ages, it holds a little less charge. The change happens gradually.