The stochastic nature of the processes of sputtering and adsorption leads to the stochastic mixing of the deposited atoms with atoms of the substrate and to the development of an altered layer between growing film and substrate. A model is developed for multi-component deposition on multi-element substrates having different sticking coefficients and sputtering yields. It is shown that, owing to stochastic mixing, an altered layer is formed, the thickness of which depends on the deposition and sputtering parameters. In the simplest cases, the kinetics of the redistribution of compoments can be considered as a diffusion process with an effective parameter of diffusion depending of the rate of the corresponding process. This model is refined to include diffusion-like atomic exchanges between neighboring monolayers. It is shown that thermal and radiation-enhanced diffusion during simultaneous deposition and sputtering does not affect the steady-state composition of the growing film when deposition prevails or the surface composition when sputtering prevails. Diffusion increases the thickness of the altered layer. The effect of ballistic mixing is briefly discussed.