Understanding the fate of an electronically excited molecule constitutes an important task for theoretical chemistry, and practical implications range from the interpretation of atto- and femtosecond spectroscopy to the development of light-driven molecular machines, the control of photochemical reactions, and the possibility of capturing sunlight energy. However, many challenging conceptual and technical problems are involved in the description of these phenomena such as 1) the failure of the well-known Born-Oppenheimer approximation; 2) the need for accurate electronic properties such as potential energy surfaces, excited nuclear forces, or nonadiabatic coupling terms; and 3) the necessity of describing the dynamics of the photoexcited nuclear wavepacket. This review provides an overview of the current methods to address points 1) and 3) and shows how time-dependent density functional theory (TDDFT) and its linear-response extension can be used for point 2). First, the derivation of Ehrenfest dynamics and nonadiabatic Bohmian dynamics is discussed and linked to Tully's trajectory surface hopping. Second, the coupling of these trajectory-based nonadiabatic schemes with TDDFT is described in detail with special emphasis on the derivation of the required electronic structure properties.