This is a question that requires your efforts starting to read diligently through a matter that is abbreviated MCMC (Markov Chain Monte Carlo). In this context the Monte Carlo Method provides a random sampling technique (algorithm) to obtain relevant information from observations on a system which we can theoretically model by a Markov Chain. In layman terms one obtains from a system, which can be described by a Markov Chain, per-sample observations by randomly playing roulette. See for basic introduction here>>>.
Reference to books find here>>>
and here>>>
Generally there are lots of diverse other references on the topic on MSE: <