Some of the answers seem to add to the confusion!
The dominant chord in a key is so called as it is a pushy sounding chord. It tends aurally to want the tonic chord to follow it. No, it isn't always the case that the tonic comes next, but that's part of the tension that music can bring. You expect one thing, and something different happens.
The dominant seventh chord has an extra note to the triad of 1,3 and 5. The sequence is followed, so it's a 7. That's where confusion sets in. It's not the 7th of the scale that the dominant chord would be the key of. In other words, G7, as a dominant of C, would have F natural as the 7th part of it. Not F#, which is the 7th of the G scale.
That's because G7 - a.k.a. G dominant 7th - is a chord from the C key, not its own G key.I know that sounds adaft, as we find G7 in lots of songs that are in G. However, most times, the following chord is C (or Cm), so the G7 needs the 7th part of it to be from key C rather than its own key,G.
Musically, what's happening is the 3 is a semitone below the tonic root, and the 7 is a semitone above the tonic 3. To resolve, they both move a semitone each, the smallest change possible, and everything sounds fine again. The tritone - very unstable sounding - resolves to a nice major (or minor) 3rd interval.
So, in summary, the dominant 7th chord has all its notes from the tonic it's pushing to, as in E7 has a D as its 7th, even though the key of E has D# in it. It has become part of the tonic it's aiming for, so needs a D natural.This 7th can also be called a m7 or b7 of the dominant's own key.
I was hoping to uncomplicate the concept, but it's not a particularly simple answer after all!