1. End to end gives more volts
Two cells wired in series add their voltages together. Two 1.5-volt AA cells make 3 volts, which is why some devices ask for two. The pair is only half used when the first cell runs out.
2. Side by side gives more capacity
Two cells wired in parallel keep the same voltage and run for twice as long. Both should be the same type and about the same age, because the weaker cell decides when the pair is finished.
3. Never mix types
Do not put a fresh alkaline cell next to an old rechargeable one. The different voltages can make the weaker cell leak, and a leak inside a device is a bigger problem than a flat battery.
4. Use a proper holder
A battery holder that joins cells the right way is cheap, and safer than wires twisted together. It keeps the terminals apart, stops them shorting against a coin, and holds the cells where they cannot roll around.