ARGO-YBJ is an air shower detector array with a fully covered layer of resistive plate chambers. It is operated with a high duty cycle and a large field of view. It continuously monitors the northern sky at energies above 0.3 TeV. In this paper, we report a long-term monitoring of Mrk 421 over the period from 2007 November to 2010 February. This source was observed by the satellite-borne experiments Rossi X-ray Timing Explorer and Swift in the X-ray band. Mrk 421 was especially active in the first half of 2008. Many flares are observed in both X-ray and gamma-ray bands simultaneously. The gamma-ray flux observed by ARGO-YBJ has a clear correlation with the X-ray flux. No lag between the X-ray and gamma-ray photons longer than 1 day is found. The evolution of the spectral energy distribution is investigated by measuring spectral indices at four different flux levels. Hardening of the spectra is observed in both X-ray and gamma-ray bands. The gamma-ray flux increases quadratically with the simultaneously measured X-ray flux. All these observational results strongly favor the synchrotron self-Compton process as the underlying radiative mechanism.