Protostars interact violently with their natal cocoons within dense molecular clouds. Characterizing this feedback is key to understanding the efficiency of the star formation process and the chemical processing of material that will be available for planet formation. In this thesis, the imprints of physical processes on molecular gas are analyzed using state-of-the-art far-infrared spectroscopy from Herschel / PACS. Interpretation of the origin of far-infrared line emission allows us to quantify the physical conditions and the role of shocks and ultraviolet radiation during the 'kindergarten years' of low- and high-mass protostars.UBL - phd migration 201