A comprehensive and detailed account of the physics of gravitational waves and their role in astrophysics and cosmology. The part on astrophysical sources of gravitational waves includes chapters on GWs from supernovae, neutron stars (neutron star normal modes, CFS instability, r-modes), black-hole perturbation theory (Regge-Wheeler and Zerilli equations, Teukoslky equation for rotating BHs, quasi-normal modes) coalescing compact binaries (effective one-body formalism, numerical relativity), discovery of gravitational waves at the advanced LIGO interferometers (discoveries of GW150914, GW151226, tests of general relativity, astrophysical implications), supermassive black holes (supermassive black-hole binaries, EMRI, relevance for LISA and pulsar timing arrays). The part on gravitational waves and cosmology include discussions of FRW cosmology, cosmological perturbation theory (helicity decomposition, scalar and tensor perturbations, Bardeen variables, power spectra, transfer functions for scalar and tensor modes), the effects of GWs on the Cosmic Microwave Background (ISW effect, CMB polarization, E and B modes), inflation (amplification of vacuum fluctuations, quantum fields in curved space, generation of scalar and tensor perturbations, Mukhanov-Sasaki equation,reheating, preheating), stochastic backgrounds of cosmological origin (phase transitions, cosmic strings, alternatives to inflation, bounds on primordial GWs) and search of stochastic backgrounds with Pulsar Timing Arrays (PTA).