The numerical modeling of reactive transport in a porous medium has important applications in hydrology, the earth sciences and in numerous industrial processes. However, realistic simulations involving a large number of chemical species undergoing simultaneous transport and chemical transformation present a significant computational challenge, particularly in multiple spatial dimensions. A framework for analyzing the chemical batch problem is first introduced, which is sufficiently general to allow for reaction of both equilibrium and kinetic type. The governing equations for reactive transport of a single flowing phase through a porous medium are presented next, and a classification based on the nature of the reactive system is established. A computer module for the equilibrium problem is developed, based on a novel application of the interior-point algorithm for nonlinear programming. Among its advantages are good global convergence and automatic selection of mineral phases. To handle kinetic reactions, the equilibrium module is embedded in a time-integration framework using explicit ODE integrators. Reactive transport of species is achieved through operator-splitting, which enables a straightforward incorporation of the batch module into the existing parallel, three-dimensional, single-phase flow and transport simulator PARSim1. Numerical results are presented which demonstrate the correctness of the computer program for major classes of geochemistry problems, including ion-exchange, precipitation/dissolution, adsorption, aqueous complexation and redox reactions.