A model for the flow of a thin film, with and without solidification, on an arbitrary three-dimensional substrate is presented. The problem is reduced to two simultaneous partial differential equations for the film and solid layer thicknesses. The flow model (with the solidification rate set to zero) is the first such model to describe thin film flow on an arbitrary three-dimensional surface. Various limits are investigated to recover previous models for flow on flat, cylindrical and two-dimensional curved surfaces. With solidification a previous model for accretion on a flat substrate is retrieved. It is shown how the model may be reduced to standard forms, such as solidification on a flat surface, circular and non-circular cylinders, aerofoils and spheres. Numerical solutions are obtained by combining an ADI scheme with a shock capturing method. Results are presented for flow and accretion on a flat surface, aerofoil and sphere.