Chemical exchange saturation transfer (CEST) is one of the contrast mechanisms in magnetic resonance imaging (MRI) and has been used to detect dilute proteins through the interaction between bulk water and labile solute protons. Amide proton transfer (APT) MRI has been developed for imaging diseases such as acute stroke. Moreover, various CEST agents have been explored to enhance the CEST effect. The contrast mechanism of CEST or APT MRI, however, is complex and depends not only on the concentration of amide protons or CEST agents and exchange properties, but also varies with imaging parameters such as radiofrequency (RF) power and magnetic field strength. When there are multiple exchangeable pools within a single CEST system, the contrast mechanism of CEST becomes even more complex. Numerical simulations are useful and effective for analyzing the complex contrast mechanism of CEST and for investigating the optimal imaging parameter values. In this chapter, we present the basics of CEST or APT MRI and a simple and fast numerical method for solving the time-dependent Bloch-McConnell equations for analyzing the behavior of magnetization and/or contrast mechanism in CEST or APT MRI. We also present a method for analyzing the behavior of magnetization in spin-locking CEST MRI.