There are a multitude of different battery technologies available. There are some really great resources available for the nitty gritty details behind battery chemistries. Wikipedia is especially good and all encompassing. This tutorial focuses on the most often used batteries for embedded systems and DIY electronics.
There are some concepts and bits of knowledge you may want to know before reading this tutorial:
What is a Circuit?
Voltage, Current, Resistance, and Ohm's Law
What is Electricity?
Looking to explore different batteries?
We've got you covered!