The model reduction problem for (single-input, single-output) linear and nonlinear systems is addressed using the notion of moment. A re-visitation of the linear theory allows to obtain novel results for linear systems and to develop a nonlinear enhancement of the notion of moment. This, in turn, is used to pose and solve the model reduction problem by moment matching for nonlinear systems, to develop a notion of frequency response for nonlinear systems, and to solve model reduction problems in the presence of constraints on the reduced model. Connections between the proposed results, projection methods, the covariance extension problem and interpolation theory are presented. Finally, the theory is illustrated by means of simple worked out ...