Baby stars are messy eaters. This diagram from a review article illustrates the complex interplay between protostars, magnetic fields, and the surrounding gas on large and small scales.
Stars form in cold, dusty clouds of mostly hydrogen gas. As they grow, stars pull in more mass from disks, permeated with magnetic fields. The fields twist around the star, channeling some gas into the star and some into jets above and below the disk.
1/
📷 Frank et al. 2014
https://ui.adsabs.harvard.edu/abs/2014prpl.conf..451F/abstract