AAA, AA, C and D cells all produce about 1.5 volts of electricity, but smaller-sized batteries do not last as long as larger ones. In a flashlight, batteries usually operate in series, so they provide the sum of the individual voltages.
Chemists call the reaction that produces an electric charge in batteries a redox reaction. In these reactions, one material gains electrons and the other loses them. The design of the battery forces the electrons to move through a circuit. Manufacturers typically use zinc and carbon for this reaction in the least expensive batteries or magnesium dioxide and zinc powder in alkaline batteries that last longer. Rechargeable AAA batteries commonly use a carbon anode and lithium cobalt oxide for the cathode.