HETE-2 has provided strong evidence that the properties of X-ray flashes (XRFs), X-ray-rich gamma-ray bursts (GRBs), and GRBs form a continuum, and therefore that these three kinds of bursts are the same phenomenon. A key feature found by HETE-2 is that the density of bursts is roughly constant per logarithmic interval in burst fluence SE and observed spectral peak energy E, and in isotropic-equivalent energy Eiso and spectral peak energy Epeak in the rest frame of the burst. In this paper, we explore a unified jet model of all three kinds of bursts, using population synthesis simulations of the bursts and detailed modeling of the instruments that detect them. We show that both a variable jet opening angle model in which the emissivity is a constant independent of the angle relative to the jet axis and a universal jet model in which the emissivity is a power-law function of the angle relative to the jet axis can explain the observed properties of GRBs reasonably well. However, if one tries to account for the properties of XRFs, X-ray-rich GRBs, and GRBs in a unified picture, the extra degree of freedom available in the variable jet opening angle model enables it to explain the observations reasonably well while the power-law universal jet model cannot. The variable jet opening angle model of XRFs, X-ray-rich GRBs, and GRBs implies that the energy Eγ radiated in gamma rays is ~100 times less than has been thought. The model also implies that most GRBs have very small jet opening angles (~half a degree). This suggests that magnetic fields may play an important role in GRB jets. It also implies that there are ~104-105 more bursts with very small jet opening angles for every burst that is observable. If this is the case, the rate of GRBs could be comparable to the rate of Type Ic core-collapse supernovae. These results show that XRFs may provide unique information about the structure of GRB jets, the rate of GRBs, and the nature of Type Ic supernovae.