As is typical in music theory, one often has to use labels and terms for chords for two different purposes: (1) to describe the actual collection of pitches present in a chord, and (2) to describe the "function" of the chord (usually where it resolves, how it fits into the local scale and local progressions, etc.).
From the first perspective, a secondary dominant can sometimes refer to any chord that one could slap a Roman numeral label of V/V or V7/vi or whatever on. In C major, those example chords would have the notes D-F#-A and E-G#-B-D respectively. Naively, one could just place such labels on all such collections of pitches, without regard to where the chords come from or go.
But Roman numerals and terms like "secondary dominant" are not only about labeling a collection of pitches. They also tend to assume something about a chord's function. Most analysts will try to use "secondary dominant" in an application where it makes sense, i.e., a context where it "does what dominant chords do."
And dominant chords can do a lot of things. They most frequently resolve to tonic. But they can also occasionally do other things, like deceptive cadence progressions (V-vi or V-VI in minor). Richard's answer shows an example of a secondary dominant doing that. It still makes sense to call the chord a "secondary dominant," as it's doing something that normal dominant chords frequently do within their own key. Even less frequently, dominant chords resolve other places, like IV6 (particularly if the dominant chord is inverted). And, as Richard notes, sometimes the secondary dominant relates mostly backwards to a "secondary tonic" that comes before it, but then the resolution of the secondary dominant is non-standard.
Basically, as long as a secondary dominant chord is doing something reasonably like what a "dominant chord" would do within the secondary key, it makes sense to call it and label it a secondary dominant. But what if it doesn't? What if the E-G#-B-D chord above didn't resolve normally at all in the secondary key of A minor, but instead resolved with the outer tones moving outward to Eb-Ab-C-Eb, and then further that chord moved to Eb-G-Bb-Eb. Well, then the E-G#-B-D isn't a secondary dominant in A minor at all, but rather a weirdly spelled augmented sixth chord in A-flat major, and from a functional standpoint, you should call the E-G#-B-D chord that instead.
In some cases, you might even have a dual-function chord. If in the previous example, there was an A minor chord right before the E7, which then modulated to A-flat major, the E7 chord could be a "secondary dominant" that relates backwards to the A minor and sounds right within that local key. But going forward, it's a pivot chord that begins to function as an augmented-sixth chord in its resolution.
And if the E-G#-B-D chord appears out of the blue in a C major piece and then does something even weirder that doesn't tend to happen normally in any key (e.g., say it resolves to a D-flat major chord), then it might not make much sense to put any tonal label on it. The term "secondary dominant" implies at least some sense of tonal function when using the word "dominant." If the chord just skips to a random other chord, you just have a weird chain of chords that can't be explained using normal tonal syntax or terminology.