Markov switching models
Firstly, for understanding the Markov switching models, a nice knowledge of Markov models and the way they work. Most importantly, an idea of time series models and how they work, is very important.

I found this tutorial good enough for getting up to speed with the concept.

This is another tutorial on a similar application of the switching model, which is the regime switching model.

The statsmodels library has a nice support for building the Morkov switching models.

Here is one simple and quick Python tutorial which uses the statsmodels library.