â€‹Robert and Casella (2013) provides the following definition:

For illustration, you can visit the jupyter notebook on MCMC_exampleâ€‹

Working principle: For an arbitrary starting value $x^{(0)}$, a chain $X^{(t)}$ is generated using a transition kernel with stationary distribution $f$, which ensures the convergence in distribution of $X^{(t)}$ to a random variable from $f$.

Some good materials about MCMC.