The purpose of this review is to provide a comprehensive pedagogical introduction into Keldysh technique for interacting out-of-equilibrium fermionic and bosonic systems. The emphasis is placed on a functional integral representation of underlying microscopic models. A large part of the review is devoted to derivation and applications of the non-linear σ-model for disordered metals and superconductors. We discuss such topics as transport properties, mesoscopic effects, counting statistics, interaction corrections, kinetic equation, etc. The chapter devoted to disordered superconductors includes Usadel equation, fluctuation corrections, time-dependent Ginzburg-Landau theory, proximity and Josephson effects, etc. (This review is a substantial extension of arXiv:cond-mat/0412296.)