We give a general framework for deriving a posteriori error estimates for approximate solutions of nonlinear problems. In a first step it is proven that the error of the approximate solution can be bounded from above and from below by an appropriate norm of its residual. In a second step this norm of the residual is bounded from above and from below by a similar norm of a suitable finite-dimensional approximation of the residual. This quantity can easily be evaluated, and for many practical applications sharp explicit upper and lower bounds are readily obtained. The general results are then applied to finite element discretizations of scalar quasi-linear elliptic partial differential equations of 2nd order, the eigenvalue problem for scalar linear elliptic operators of 2nd order, and the stationary incompressible Navier-Stokes equations. They immediately yield a posteriori error estimates, which can easily be computed from the given data of the problem and the computed numerical solution and which give global upper and local lower bounds on the error of the numerical solution.