Tritone substitution, and the bass that falls by semitone
Swapping a dominant for the dominant a tritone away, which shares its inner tritone; it is what turns a II–V–I into chromatic downward movement in the bass.
The dominant of C is G seventh, and what makes it dominant is two notes: B and F, the tritone. There is another dominant chord with the same tritone: D flat seventh, whose notes are D flat, F, A flat and C flat. F is F; C flat is B under another name. The two chords have the same pair of notes asking to resolve, and so one can take the other's place. That is tritone substitution, and it is the trademark of bossa nova.
Why it works
The roots of the two chords are a tritone apart: from G to D flat is six semitones. And the inner tritone is the same, with the functions swapped: the B, which was G's third, becomes D flat's seventh, spelled C flat; the F, which was G's seventh, becomes D flat's third.
Since the tritone resolves the same way — B to C and F to E — the substitute chord takes the music to the same place. What changes is the root, and with it the bass.
The bass that falls
In a II–V–I, the roots fall by fifths: D, G, C. Swap the G seventh for a D flat seventh and the roots start falling by semitone: D, D flat, C.
That descending chromatic bass is what you hear in so much bossa nova. The sentence has lost nothing — the preparation, the tension and the rest are all there; it is the bass's path that has gone smooth, and the colour of the tension chord has darkened, because D flat seventh sits much further from C major on the circle of fifths than G does.
On any dominant
The substitution holds for any dominant chord, not only the fifth degree. A secondary dominant has a substitute too: the V7 of II in C major is A seventh, and its substitute is E flat seventh, a tritone from A.
C, E flat seventh, D minor seventh, D flat seventh, C. Two substitutions in a row, and the bass falls by semitones from beginning to end: E flat, D, D flat, C. Chain them and the music walks from dominant to dominant down a chromatic staircase.
How to write it
The substitute is written as a dominant chord on the note a tritone from the original dominant, and the numeral describing it is ♭II7, or subV7 in jazz notation: a dominant chord built on the lowered second degree. The spelling of the seventh follows the chord, not the key: in D flat seventh the seventh is a C flat, even though the note is the B the ear knows. The chart abbreviates and writes Db7; the score, if written out, says C flat.
What to take from here
Two dominant chords a tritone apart share their inner tritone, with third and seventh swapped, and so they resolve to the same place. The substitution swaps one for the other, and the practical result is a bass that falls by semitone instead of leaping a fifth. It holds for the fifth degree and for every secondary dominant, and chained it produces the chromatic staircase running through bossa nova harmony.