Harmonic function refers to the tendency of chords in a key to either progress to specific chords or to rest as they are.
It’s easy to think of them as hard and fast rules of “this chord can only go to this other chord,” but “rules” here are more of a list of what tends to happen in most Western, tonal music.
To talk about functions and keys, we build chords by stacking triads on each step of a scale (major or minor) and label them with numbers according to which scale step they’re built from. The first chord, would be one, and we use capital Roman numerals for major and augmented chords and lowercase Roman numerals for minor and diminished (diminished also have a degree symbol) chords.
Below is a C major scale with chords built on every scale step and the capital and lowercase Roman numerals:
In Western, tonal music, there are four categories of harmonic functions: tonic, dominant, pre-dominant, and expansions. A “regular” phrase follows a map of tonic (T) – pre-dominant (PD) – dominant (D) – tonic (T), and the expansions serve to make any of these sections of music last a little longer.
Tonic — the chord that is happy “at rest,” meaning, we are comfy as listeners ending a phrase or a piece of music on the tonic. These are the “home” or “root” chords of a key and are signified as Roman numerals I (major) or i (minor)
Dominant — the chords that tend to be followed by a tonic chord. Dominant chords are built from either the fifth step in the scale or the seventh. They have a tendency to move to the tonic because these chords contain the leading tone (scale step seven, which is a half-step below scale step 1, or C in the example above) and the supertonic (scale step 2, which likes to move downward to scale step 1). These dominant chords are V or vii°
Pre-dominant — the chords that tend to be followed by dominant chords. These are IV and ii.
Expansions — chords that make each of the functions above last a little longer than single chords. Oftentimes, we talk about tonic prolongation more specifically, but any of the above functions can be expanded to make a phrase in music more interesting.
For example, a tonic prolongation might start with a I chord, move to a different chord, then return to that I chord, and we could label it in one of two ways: just one long tonic function or labelling the first chord as tonic and then the rest as tonic prolongation. It’s up to your instructor which they prefer, but if you’re on your own, choose whichever is easiest to you. I recommend when you’re first practicing to label the prolongations, so you’re aware they’re happening.
The example below’s progression goes I–IV–I, which shows that the IV chord is serving an expansion or prolongational role. It’s making the tonic function last longer by not progressing to a dominant function.