Trying to explain nebula painting is like trying to explain how to engineer a bridge (my other profession). If I start at the very basics we'll all die of boredom before we get a beautiful picture. This is an art tutorial, so I will favor pictures over words.
So, lets start with a crucial idea:
The basis of realistic nebula painting is shape randomness.
I have found that my best nebula are those that I didn't plan at all, they emerged from me haphazardly spraying with a brush and then I picked out some cool shapes.
So lets begin:
Step 1: Background Stars
The creation of stars is outside the scope of this tutorial. My method is to use a custom brush with lots of size, scattering, and opacity variation. You can also use noise layers to create a quick starfield.
For a quick guide to stars, see this: Stars from Noise Tutorial by For-as
These stars are painted on a black layer set to Linear Dodge.