  Stars are amongst the most fundamental structures of our Universe. They
comprise most of the baryonic and luminous mass of galaxies, synthethise heavy
elements, and injec\ t mass, momentum, and energy into the interstellar medium.
They are also home to the planets. Since stellar properties are primarily
decided by their mass, the so-called \ stellar initial mass function (IMF) is
critical to the structuring of our Universe. We review the various physical
processes, and theories which have been put forward as well as the numerical
simulations which have been carried out to explain the origin of the stellar
initial mass function. Key messages from this review are: (1) Gravity and
turbulence most likely determine the power-law, high-mass part of the IMF. (2)
Depending of the Mach number and the density distribution, several regimes are
possible, including $\Gamma _{IMF} \simeq 0$, -0.8, -1 or -1.3 where $d N / d
\log M \propto M^{\Gamma_{IMF}}$. These regimes are likely universal, however
the transition between these regimes is not. (3) Protostellar jets can play a
regulating influence on the IMF by injecting momentum into collapsing clumps
and unbinding gas. (4) The peak of the IMF may be a consequence of dust opacity
and molecular hydrogen physics at the origin of the first hydrostatic core.
This depends weakly on large scale environmental conditions such as radiation,
magnetic field, turbulence or metallicity. This likely constitutes one of the
reason of the relative universality of the IMF.
