Simulations are helpful in investigating complex systems. This boook focuses on the software simulation of magnetic resonance imaging (MRI) which is one of the most complicated medical imaging methods. The developed software performs NMR (nuclear magnetic resonance) phenomenon simulation starting from the motion of a spin under the influence of external magnetic fields to pulse sequences generating the image. The simulation is based on physical principles and is able to produce possible artifacts in MRI images like intra-voxel dephasing, chemical shift, and cross-talk. It achieves this by solving the Bloch equation numerically on realistic 3D virtual objects. The simulation makes use of the Java language and object oriented approach to produce a platform- independent, extensible and modular software. The book gives the theory behind MRI, explains the techinuques used in the simulation, compares it with previous simulators and depicts the software design of the simulation with flowcharts and UML diagrams.