It is the alto who first states the subject in bar 1. The subject is the theme of which the fugue is established. This subject finishes on the first beat of bar 3. After this subject is stated the alto starts with a counter subject (accompanies the subject), while the soprano voice answers the subject with the answer (transposition of the subject). This answer is tonal, because the intervals are not exactly the same and it is in the dominant key of G minor.
Between where the final voice, the bass enters with the subject and where the answer finished is a small 2 bar codetta, where both the soprano voice is based on the subject in sequence and the alto voice is based on the counter subject in sequence. Jus before the bass enters there is a false entry in the alto voice. When the Bass enters with the subject at bar 7 in its original form and both of the other parts continue with countersubject material. At the first down beat of bar 9 the exposition finishes. The middle section is where subject is developed it is also where episode 1 starts.
An episode is a connecting passage, developed from previous material. Episode 1 starts off with the soprano and alto voice in stretto, where one voice comes in before the other has finished, and the bass is accompanying them with scalar passages based on the countersubject material. Bar 11 is the first middle section is heard. It consists of the soprano voice having the subject, but in a different key. The bass with counter subject material accompanies it. Episode 2 where soprano voice has the contrary motion of the counter subject and the lower two parts are in thirds ccompanying. Bar 15 is the 2nd middle entry in G minor, where the subject is heard by the alto with the soprano with counter subject material.
The third episode starts in bar 17 where the soprano and bass voices have the subject material in rising sequence. The alto part is based on the counter subject but in contrary motion to the original counter subject. At bar 18 the alto and bass parts swap parts. The final section (where the piece returns to its original key) starts at the 3rd middle entry in bars 20. The 3rd middle entry goes from bar 20 to the first downbeat of bar 22.
It has the soprano voice with the subject, while the bass and alto hold the countersubject. Episode 4 is the longest as it goes from bar 22 to half way through 26, it is in C minor. At the start of this episode the soprano and alto voices are in stretto like they were in episode 1. The bass part continues with the counter subject material until the end of the episode 4. At bar 25 the soprano has the subject. The soprano and bass swap parts half way through bar 26 and this is the start of the 4th middle entry. The 4th middle entry returns to C minor, here the soprano and bass swap parts and the bass has the subject.
In bars 29 to the end we hear a coda. This is where we hear the subject for the last time after a short cadential phrase. This is accompanied by a pedal not in the bass. Overall Bachs Fugue in C minor is written very similar to what generally a fugue is. Fugue in C minor has an Exposition, middle section and final section. He has also put in four episodes and four middle entries. The four episodes are bars 9-13, 14-17, 18-21, 22-31. The Four middle entries are bars 11-13, 15-17, 19-22, 26-28. This fugue ends like many other fugues with the subject heard one last time in the original tonic key.