Easy.
Think about the name Dominant... that's the 5th note of a scale, isn't it?
So if we have Dominant 7th of C Major, it would start on the 5th note of C major, which as you have it, is G.
Then where does the 7th come in? Well, if you count from the G, then the 7th is an F.
So there you have it, a domninant chord or triad in C major, GBD, and a 7th from the G, so you get GBDF.
In the same way we can work out the dominant 7th of other keys.. like G major.
Dominant of G major = D
Dominant chord = D F# (G major has F#, remember) A
7th of the dominant (D) = C
Hence dominant 7th of G major = DF#AC
Hope that helps