Stein's method provides a way of finding approximations to the distribution, ¿ say, of a random variable, which at the same time gives estimates of the approximation error involved. In essence the method is based on a defining equation, or equivalently an operator, of the distribution ¿ and a related Stein equation. Up to now it was not clear which equation to take. One could think of a lot of equations. We show how for a broad class of distributions, there is one convenient equation. We give a systematic treatment, including the Stein equation and its solution. A key tool in Stein's theory is the generator method developed by Barbour and we suggest employing the generator of a Markov process for the operator of the Stein equation. For a given distribution there may be various Markov processes which fit in Barbour's method and, up to now, it was still not clear which Markov process to take to obtain good results. We show how for a broad class of distributions there is a special Markov process, a birth and death process, or a diffusion, which takes a leading role in the analysis. Furthermore, a key role is played by the classical orthogonal polynomials. It turns out that the defining operator is based on a hypergeometric difference or differential equation, which lies at the heart of the classical orthogonal polynomials. Furthermore, the spectral representation of the transition probabilities of the Markov process involved are in terms of orthogonal polynomials closely related to the distribution to be approximated. This systematic treatment together with the introduction of orthogonal polynomials in the analysis seems to be new. Furthermore some earlier uncovered examples like the beta, the Student's t, and the hypergeometric distribution are now worked out.