This paper describes the main features and the most recent developments of system identification in the sense of data-driven modeling of dynamical systems. A brief summary of discrete time-invariant system identification techniques is provided, from the modern work of Gilbert, Kalman and Ho and the introduction of state-space realization, to the most recent developments of the identification of discrete time-varying and nonlinear systems. Important concepts of state-space realization, controllability and observability for linear systems are introduced along with more advanced methods to identify nonlinear dynamics. Numerical examples of varying complexity are considered to demonstrate the capability of the different approaches presented in this paper.