In this review paper, we aim at providing a global outlook on the progresses made in the recent years to characterize the role of magnetic fields during the embedded phases of the star formation process. Thanks to the development of observational capabilities and the parallel progress in numerical models capturing most of the important physics at work during star formation, it has recently become possible to confront detailed predictions of magnetized models to observational properties of the youngest protostars. We provide an overview of the most important consequences when adding magnetic fields to state-of-the-art models of protostellar formation, emphasizing their role to shape the resulting star(s) and their disk(s). We discuss the importance of magnetic field coupling to set the efficiency of magnetic processes, and provide a review of observational works putting constraints on the two main agents responsible for the coupling in star-forming cores: dust grains and ionized gas. We recall the physical processes and observational methods allowing to trace the magnetic field topology and its intensity in embedded protostars, and review the main steps, success and limitations in comparing real observations to synthetic observations from the non-ideal MHD models. Finally, we discuss the main threads of observational evidence that suggest a key role of magnetic fields for star and disk formation, as well as the remaining tensions that exist between models and observations.