The random geometry of real porous media is analyzed with the objective of reproducing it numerically; adequate algorithms are proposed for consolidated materials which may be statistically homogeneous or not, and may possess more than one solid phase; random packings of star-shape grains are built to mimic non-consolidated materials which are usually obtained by settling processes. The macroscopic properties of all these media can be deduced by solving the local partial differential equations which govern the phenomena; finite difference schemes are used most of the time. A number of physical situations have been already addressed. Elementary transport phenomena such as convection, diffusion and convection-diffusion provide the basic illustrations of our methodology. Multiphase flows is an exception in the sense that the resolution is achieved by means of a lattice-Boltzmann algorithm. The electrokinetic phenomena associated with the motion of an electrolyte through a charged medium are addressed close to equilibrium, in the limit of small dzeta potentials and thick double layers. Industrial processes may involve deposition and/or dissolution of a solute; first-order reactions of a single solute could be successfully analyzed and rationalized with the help of the Péclet and the Damköhler numbers. Similarly, the macroscopic mechanical properties of the solid matrix of a porous medium can be obtained by solving the elastostatic equations; macroscopic coefficients such as the equivalent Young’s modulus were derived for a number of structures. Some tentative remarks conclude this review. This article contains 289 references.