  The diffuse gas in and nearby the Milky Way plays an important role in the
evolution of the entire Galaxy. It has a complex structure characterized by
neutral, weakly and highly ionized gas, dust, and molecules. We probe this gas
through the observation of its absorption lines in the high-energy spectra of
background sources. We use high-quality spectra of AGN Mrk 509, located at high
Galactic latitudes obtained with XMM-Newton, HST and FUSE. We use advanced
absorption models consisting of photo- and collisional-ionization. We constrain
the column density ratios of the different phases of the interstellar medium
(ISM) and measure the abundances of C, N, O, Ne, Mg, Al, Si, S, and Fe. We
detect seven discrete interstellar clouds with different velocities. One is a
typical low-velocity cloud (LVC) and three belong to the family of the
intermediate-velocity clouds (IVCs) found near the Galactic disk. These four
clouds show large deviation from Solar abundances in the gas phase, mostly
caused by dust depletion. The other three clouds are ionized high-velocity
clouds (HVCs) and are located either in the Galactic environment or in the
Local Group halo as suggested by the signatures of collisional ionization. The
similar abundances and ionization structure of the HVCs suggest a common
location and origin: they might belong to the remainder of an extragalactic
cloud which was captured by the Galaxy. We have shown that combined UV / X-ray
spectroscopy is a powerful tool to investigate the ISM. In common Galactic
clouds, like LVCs and IVCs, the ISM shows a complex structure consisting of at
least three different temperature phases.
