This exercise is from the Theory section on Resolving chords. Go there to learn more about the context of this exercise.
This is a simple example of resolving two chords - by moving from the more dissonant (unresolved) D diminished chord to the more stable D major chord.
Even though both chords are related to D there is a distinct difference between them in terms of tonality. The final D major chord sounds more harmonically stable. This is because the 1st and 5th (D and A) notes have a very strong harmonic relationship. Altering the 5th note (by raising it or lowering it by a semitone) significantly destabilizes the chord. We've already looked at augmented and diminished triads, and how the 5th note is altered, so you should have a good idea by now about their makeup. Go to the sections on Diminished and Augmented Triads in the theory section if lost!
Here we use the D diminished chord to 'set up' the final D major chord. This is called 'build tension then release' or, more correctly, 'resolution'.
Resolution is based on the fact that we are used to patterns in music, and like certain chord changes - they feel more natural to us than others. This means that when we hear a chord progression we have an 'expectation' of what the next chord will be. This is particularly true for western music tastes where we are used to chord progressions rooted in keys. The stronger the sense of the key in the music, the more desire for resolution if we move drastically away from the root / home chord for that particular key. That said, resolution doesn't have to be key dependent - we can desire resolution from just experiencing unstable / dissonant chords....
When we play an unstable chord, we experience dissonance, and naturally wish that to be resolved. i.e. to move to a more stable (consonant) state.
For this reason, dissonant chords (like the diminished and augmented chords) are great for building tension. Often these chords will be used in horror movies for the suspense scenes. Their unstable harmonic nature means these chords have a lot of inherent tension. This affects listeners who generally will expect the chord to 'resolve' - i.e. move to a stable, consonant state. That's exactly what we do in this simple exercise.
Play the chords in this exercise yourself. Strum the D dim chord quite hard to help establish the tension - then gently strum the D major chord. This resolves the tension, and 'feels right'. That is exactly what resolution is all about.
There are principles that determine resolution - The main factors determining resolution are totally context based:
1. Tonality - If you are playing in a key, the desire for resolution is stronger. If you aren't playing in a key and are using lots of unresolved chords, then there is less sense of a tonic centre - a root chord to resolve to. Welcome to world of experimental jazz.
2. Cultural expectations - Different people are used to different chord resolutions depending on their taste in music.