The dominant chord is the chord built on the fifth degree of the scale. In C major, the fifth degree is G, so the dominant chord is G major.
The subdominant chord is the chord built on the fourth degree of the scale. In C major, the fourth degree is F, so the subdominant chord is F major.