Understanding the electron dynamics and transport in metallic and semiconductor nanostructures -- such as metallic nanoparticles, thin films, quantum wells and quantum dots -- represents a considerable challenge for todays condensed matter physics, both fundamental and applied. In this review article, we will describe the collective electron dynamics in metallic and semiconductor nanostructures using different, but complementary, approaches. For small excitations (linear regime), the spectral properties can be investigated via quantum mean-field models of the TDLDA type (time-dependent local density approximation), generalized to account for a finite electron temperature. In order to explore the nonlinear regime (strong excitations), we will adopt a phase-space approach that relies on the resolution of kinetic equations in the classical phase space (Vlasov and Wigner equations). The phase-space approach provides a useful link between the classical and quantum dynamics and is well suited to model effects beyond the mean field approximation (electron-electron and electron-phonon collisions). We will also develop a quantum hydrodynamic model, based on velocity moments of the corresponding Wigner distribution function: this approach should lead to considerable gains in computing time in comparison with simulations based on conventional methods, such as density functional theory (DFT). Finally, the magnetization (spin) dynamics will also be addressed.