We present a scheme for using stellar catalogues to map the three-dimensional distributions of extinction and dust within our Galaxy. Extinction is modelled as a Gaussian random field, whose covariance function is set by a simple physical model of the ISM that assumes a Kolmogorov-like power spectrum of turbulent fluctuations. As extinction is modelled as a random field, the spatial resolution of the resulting maps is set naturally by the data available; there is no need to impose any spatial binning. We verify the validity of our scheme by testing it on simulated extinction fields and show that its precision is significantly improved over previous dust-mapping efforts. The approach we describe here can make use of any photometric, spectroscopic or astrometric data; it is not limited to any particular survey. Consequently, it can be applied to a wide range of data from both existing and future surveys.