Time-dependent density functional theory (TDDFT) can be viewed as an exact reformulation of time-dependent quantum mechanics, where the fundamental variable is no longer the many-body wave function but the density. This time-dependent density is determined by solving an auxiliary set of noninteracting Schrodinger equations, the Kohn-Sham equations. The nontrivial part of the many-body interaction is contained in the so-called exchange-correlation potential, for which reasonably good approximations exist. Within TDDFT two regimes can be distinguished: (a) If the external time-dependent potential is "small," the complete numerical solution of the time-dependent Kohn-Sham equations can be avoided by the use of linear response theory. This is the case, e.g., for the calculation of photoabsorption spectra. (b) For a "strong" external potential, a full solution of the time-dependent Kohn-Sham equations is in order. This situation is encountered, for instance, when matter interacts with intense laser fields. In this review we give an overview of TDDFT from its theoretical foundations to several applications both in the linear and in the nonlinear regime.