Each player has a randomness level given to them, by the 1700's this has all but dissapeared. The higher the randomness, the more often they play random moves. And believe it or not I think this is a moderately accurate model of human play as a lot of human players (Of all ratings) occasionally play moves which cause them to say, "What was I thinking. I can't believe I played that."
Also, the rating are a combination of approximation, playing rated games against the computers and probably a little bit of pre-release play organized by developers.
My cousin gave me his copy of chessmaster 10 a few months ago. However, I still don't really understand how the personalities work. Do they actually play at the ratings next to the name? Because I find that hard to believe. Are blunders incorparated into the programming?