The Lagoon Nebula, also known as Messier 8, is an interesting region, because it is embedded in a much larger cloud of gas and dust in which, until recently, star formation took place. The result of this star formation is the Open Cluster NGC 6530, which lies directly at the Lagoon’s doorstep. It may have worked like this: Parts of the original bigger dust cloud must have collapsed, forming the young NGC 6530 cluster with its bright, hot stars.
The solar winds of these new-born stars ‘burned away’ the remnants of the surrounding dust cloud of the complex. What is left is the star cluster on one side and the nebula we see today as the Lagoon Nebula on the other side.
Approaching the Lagoon Nebula from the galactic south, there are some objects that are worth visiting, namely the Open Clusters of NGC 6531 (aka Messier 21) and NGC 6530. Both clusters are relatively young and dense but still undergo expansion and the surroundings still have enough interstellar medium to continue star formation for quite some time.