Vitriols are salts of certain metals so-called because of their glassy appearance (Late Latin vitreolum, neuter of vitreolus, 'of glass'). Specifically, white vitriol is zinc sulphate, blue vitriol is copper(II) sulphate and green vitriol is iron(II) sulphate.
Dry distilling iron(II) sulphate (i.e. heating it and condensing the products) first of all drives of the water of crystallisation then decomposes the salt and liberates sulphur(VI) oxide. This dissolves in the water to produce sulphuric acid.
Concentrated sulphuric acid (98%) has a viscous, oily constituency - hence the term "oil of vitriol". Battery acid is not so concentrated (33%).