While composers use root position and first inversion triads freely, second inversion usually occurs in three situations.
Like first inversion, second inversion may be used to smooth out a bass line.
Look at this example -- notice the movement of the bass line.
By placing the V chord in second inversion, the bass line moves by step and becomes smooth.
When used in this fashion, a second inversion triad is called a passing six-four chord.
Second inversion may also be used to straighten a bass line.
Look at this example -- notice how the bass line jumps up to the F and then returns back to C.
By using a second inversion IV chord, the movement in the bass line is eliminated.
A second inversion triad used in this fashion is called a pedal six-four chord.
The cadential six-four chord is the final and most noticeable use.
In this form, the second inversion triad preceeds a V chord in a cadence. Often, the cadence will sound stronger due to the cadential six-four's presence.
Examine the cadential six-four chord and its resolution to V.
Some theorists prefer to identify the cadential six-four chord as a V with two nonharmonic tones.