The Gaia Data Release 2 (DR2): we summarise the processing and results of the identification of variable source candidates of RR Lyrae stars, Cepheids, long period variables (LPVs), rotation modulation (BY Dra-type) stars, delta Scuti & SX Phoenicis stars, and short-timescale variables. In this release we aim to provide useful but not necessarily complete samples of candidates. The processed Gaia data consist of the G, BP, and RP photometry during the first 22 months of operations as well as positions and parallaxes. Various methods from classical statistics, data mining and time series analysis were applied and tailored to the specific properties of Gaia data, as well as various visualisation tools. The DR2 variability release contains: 228'904 RR Lyrae stars, 11'438 Cepheids, 151'761 LPVs, 147'535 stars with rotation modulation, 8'882 delta Scuti & SX Phoenicis stars, and 3'018 short-timescale variables. These results are distributed over a classification and various Specific Object Studies (SOS) tables in the Gaia archive, along with the three-band time series and associated statistics for the underlying 550'737 unique sources. We estimate that about half of them are newly identified variables. The variability type completeness varies strongly as function of sky position due to the non-uniform sky coverage and intermediate calibration level of this data. The probabilistic and automated nature of this work implies certain completeness and contamination rates which are quantified so that users can anticipate their effects. This means that even well-known variable sources can be missed or misidentified in the published data. The DR2 variability release only represents a small subset of the processed data. Future releases will include more variable sources and data products; however, DR2 shows the (already) very high quality of the data and great promise for variability studies.