In C major, G7 is the V7 — it points at C. But any major or minor chord in the key can have its own dominant: the V7 of that chord, played just before it. These are secondary dominants, written V7/ii ("five of two"), V7/vi and so on.
A secondary dominant briefly makes its target feel like home. This is called tonicization: for a beat or two, Am sounds like the tonic — then the song carries on in C.
The most common one in pop is E7 → Am (V7/vi). E7 is E G♯ B D, and that G♯ is a leading tone into A. The ear hears it and expects Am, exactly as it expects C after G7.
To find one, go up a perfect 5th from the target and build a dominant seventh there:
There's no V of vii°: a diminished chord can't feel like home, so nothing tonicizes it.
Spot them by their accidentals. Each sharp (C♯, D♯, F♯, G♯) is a leading tone a half step under the target's root. In C7 the B♭ does the work instead, falling to A, the 3rd of F.
Secondary dominants are everywhere: the E7 before Am in countless ballads, the D7 → G that lifts a chorus, the C7 that sends a verse to F.
Chain them and each chord becomes the V of the next: E7 – A7 – D7 – G7 – C. Every root falls a 5th and every chord points at the one after it. That chain is the sound of ragtime, early jazz and swing — the bridge of "I Got Rhythm" (George Gershwin) runs the same chain in B♭: D7 – G7 – C7 – F7.
The target doesn't even have to keep its quality: E7 → A7 instead of E7 → Am still works, because the ear follows the root motion.
Ear tip: when a song suddenly brightens one chord before a minor chord, listen for a major chord where a minor one would normally be. That's usually a secondary dominant.