A new detailed infrared (IR) study of eight star-forming dense condensations (TCs) in M 20, the Trifid nebula, will be presented. We aim at determining the physical properties of the dust in such globules and establish the presence and properties of their embedded protostellar and/or young stellar population. For this, we analysed new Herschel far-IR and Calar Alto near-IR images of the region, combined with Spitzer/IRAC archival observations. We confirm the presence of several young stellar objects (YSOs), most with mid-IR colours of Class II sources in all but one of the observed cores. Five TCs are dominated in the far-IR by Class I sources with bolometric luminosities between 100 and 500 $L_\odot$. We discovered a counterjet to HH~399 jet and its protostellar engine inside the photodissociation region TC2, as well as another bipolar outflow system, signposted by symmetric H$_2$ emission knots, embedded in TC3. We also obtained a revised value for the distance to M~20 of $2.0 \pm 0.1$ kpc.