Always connect jumper cables to the dead battery first, then to the good battery.

Another important safety precaution is to attach the negative jumper cable for the dead battery to an unpainted metal portion of the car frame, rather than to the negative battery post. That allows any sparking to occur far from the battery itself.

Automotive Battery Explosions
(Published in Property Casualty 360, January 23, 2013)

The typical automotive battery, of lead/acid construction, is an electrochemical container that produces voltage, which causes electrical current to flow to various components in an automotive vehicle. An outer polymer case (high density polypropylene) acts as a container for an electrolyte (sulfuric acid), six cells and lead plates. Each cell delivers 2.1 volts with a total voltage of 12.6 volts, at full charge.  Vents are installed at the top of the battery to vent gasses formed during the normal charging cycles. Read more at source link below

                                                                                                  Image and article source croberts.com