The structure and dynamics of the earth's magnetosphere are dominantly controlled by the solar wind and the interplanetary magnetic field. A 3-dimensional global magnetohydrodynamic (MHD) simulation code of interaction between the solar wind and the magnetosphere is presented and we explain how to use the MHD code. Moreover, in order to visualize the MHD simulation results, we will explain how to use the VRML (Virtual Reality Modeling Language) by Fortran with several examples.