This paper presents the simulation of the interaction of a comet with the solar wind. It is used the formalism of the ideal magnetohydrodynamics (MHD) in order to simulate the behaviour of such a system. The comet itself is inserted in the equations as a spherically symmetric source of ions. Specifically, this source term represents the process of mass-loading, that is, the phenomenon where the heavy cometary ions are picked up by the solar wind. From the numerical viewpoint, it is used the FLASH code to solve the system of equations of the MHD and to generate the output files. It is investigated the influence of the physical characteristics of the solar wind, such as velocity and magnetic field, on the coma and tail of the comet. This issue is addressed by performing simulations considering, for sake of comparison, three regimes of solar activity, namely: low activity, "mean" or typical activity and intense activity.