I review what has been learnt so far regarding the origin of stellar properties from numerical simulations of the formation of groups and clusters of stars. In agreement with observations, stellar properties are found to be relatively robust to variations of initial conditions in terms of molecular cloud structure and kinetics, as long as extreme initial conditions (e.g. strong central condensation, weak or no turbulence) and small-scale driving are avoided, but properties may differ between bound and unbound clouds. Radiative feedback appears crucial for setting stellar masses, even for low-mass stars, while magnetic fields can provide low star formation rates.