To connect batteries in a series, use a jumper cable to connect the negative terminal of the first battery to the positive terminal of the second battery. Use another set of cables to connect the open positive and negative terminals to your application.
Connecting batteries in series will double the voltage while maintaining the same amount of current. Series circuits do not overheat easily. This makes them useful in the case of something that might be around a potentially flammable source.
Connecting batteries in series increases voltage but does not increase overall amp-hour capacity. (Connecting batteries in parallel increases total current capacity by decreasing total resistance, and it also increases overall amp-hour capacity. All batteries in a parallel bank must have the same voltage rating.)
A 6 volt 5 Ah battery and a 12 volt 5 Ah battery connected in series will provide 18 volts (6 volts + 12 volts) and 5 Ah. A 6 volt battery is often three 2 volt cells and a 12 volt battery is usually six 2 volt cells.