These lectures attempt to expose the most important ideas, which have been
proposed to explain the formation of stars with particular emphasis on the
formation of brown dwarfs and low-mass stars. We first describe the important
physical processes which trigger the collapse of a self-gravitating piece of
fluid and regulate the star formation rate in molecular clouds. Then we review
the various theories which have been proposed along the years to explain the
origin of the stellar initial mass function paying particular attention to four
models, namely the competitive accretion and the theories based respectively on
stopped accretion, MHD shocks and turbulent dispersion. As it is yet unsettled
whether the brown dwarfs form as low-mass stars, we present the theory of brown
dwarfs based on disk fragmentation stressing all the uncertainties due to the
radiative feedback and magnetic field. Finally, we describe the results of
large scale simulations performed to explain the collapse and fragmentation of
molecular clouds.Comment: proceedings of the Evry Schatzman School on "Low-mass stars and the
transition between stars and brown dwarfs" (Roscoff 2011), to appear in EAS
Publication Series (Eds C.Reyl\'e, C.Charbonnel, & M.Schultheis