We present the results from a detailed spectral and timing study of Mrk 421 based on the rich archival Swift data obtained during 2009-2012. Best fits of the 0.3-10keV spectra were mostly obtained using the log-parabolic model showing the relatively low spectral curvature that is expected in the case of efficient stochastic acceleration of particles. The position of the synchrotron spectral energy density peak E_p_ of 173 spectra is found at energies higher than 2keV. The photon index at 1 keV exhibited a very broad range of values a=1.51-3.02, and very hard spectra with a<1.7 were observed during the strong X-ray flares, hinting at a possible hadronic jet component. The spectral parameters varied on diverse timescales and showed a correlation in some periods, which is expected in the case of first- and second-order Fermi acceleration. The 0.3-10keV flux showed strong X-ray flaring activity by a factor of 3-17 on timescales of a few days-weeks between the lowest historical state and that corresponding to a rate higher than 100ct/s. Moreover, 113 instances of intraday variability were revealed, exhibiting shortest flux-doubling/halving times of about 1.2hr, as well as brightenings by 7%-24% in 180-720 s and declines by 68%-22% in 180-900s. The X-ray and very high-energy fluxes generally showed a correlated variability, although one incidence of a more complicated variability was also detected, indicating that the multifrequency emission of Mrk 421 could not be generated in a single zone.