What is a nebula?

Majestic and mysterious, nebulae are some of the most beautiful deep-sky objects to be found in the night’s sky. But what are these space clouds? And how are they created?