The mechanism of the initial inflationary scenario of the Universe and of its late-time acceleration can be described by assuming the existence of some gravitationally coupled scalar fields φ, with the inflaton field generating inflation and the quintessence field being responsible for the late accelerated expansion. Various inflationary and latetime accelerated scenarios are distinguished by the choice of an effective self-interaction potential V (φ), which simulates a temporarily non-vanishing cosmological term. In this work, we present a new formalism for the analysis of scalar fields in flat isotropic and homogeneous cosmological models. The basic evolution equation of the models can be reduced to a first-order non-linear differential equation. Approximate solutions of this equation can be constructed in the limiting cases of the scalar-field kinetic energy and potential energy dominance, respectively, as well as in the intermediate regime. Moreover, we present several new accelerating and decelerating exact cosmological solutions, based on the exact integration of the basic evolution equation for scalar-field cosmologies. More specifically, exact solutions are obtained for exponential, generalized cosine hyperbolic, and power-law potentials, respectively. Cosmological models with power-law scalar field potentials are also analyzed in detail.