The main purpose of this paper is to define and characterize random fields of bounded variation, that is, random fields with sample paths in the space of functions of bounded variation, and to study their mean total variation. Simple formulas are obtained for the mean total directional variation of random fields, based on known formulas for the directional variation of deterministic functions. It is also shown that the mean variation of random fields with stationary increments is proportional to the Lebesgue measure, and an expression of the constant of proportionality, called the variation intensity, is established. This expression shows, in particular, that the variation intensity depends only on the family of two-dimensional distributions of the stationary increment random field. When restricting to random sets, the obtained results give generalizations of well-known formulas from stochastic geometry and mathematical morphology. The interest of these general results is illustrated by computing the variation intensities of several classical stationary random field and random set models, namely Gaussian random fields and excursion sets, Poisson shot noises, Boolean models, dead leaves models, and random tessellations.