We summarize recent theoretical work addressing the role of magnetic fields in the process of star formation. First, we concentrate on the efficiency of magnetic braking during cloud collapse and its consequences on the formation of centrifugally supported disks around young stars. Then, we relate this issue to the well-known magnetic flux problem of star formation, and we show that the introduction of non-ideal MHD effects is a necessary step toward the development of self-consistent models for the collapse of molecular clouds and the formation and evolution of accretion disks around young stars.