Fugue is a kind of counterpoint. In fact, it is considered by come to be the purest form of counterpoint. The word fugue comes from the Latin fuga, which means "flight" (as in "running away", not "flying").
A fugue begins with a theme, called the subject, which is usually stated without accompanment. After this theme has been completed, a second voice enters to join the first voice in a "conversation". From there, any number of voices can leave or enter the conversation. There is a catch, however: to join the conversation, a voice must begin by restating the subject. Often, when a new voice enters the fray, one of the preexisting voices will engage in a countersubject, which acts as an accompaniment to the subject.
The beginning of a fugue is called the exposition. When all the voices have entered the fugue, the piece then moves on to a passage of free counterpoint. After this, the fugue will go back to the original pattern of entering voices. These are called the second exposition, third exposition, and so on... in between these expositions there is likely to be some more free-flowing counterpoint.
A fugue can end in several ways. A common method is to play the subject over a pedal point, which is a note that is "droned" over a melodic line. Another technique used to end a fugue is stretto, which is a sort of exposition where each voice enters before the previous one has finished stating the subject. This is an effective way of building up climactic tension.
Another thing you should notice about the fugue (and
counterpoint) is that it sounds pretty complicated. That's pretty
unavoidable when you have up to six voices each trying to say
something all at once, with no one voice being any more significant
than any other. This complexity is ultimately a large part of the
reason for the simplified style of the Classical Period. People just got tired of all
this elaborate music and reacted by going in the opposite
direction, towards very simple music with only one melodic line.
For this reason, the fugue pretty much died out. However, several
composers such as Ludwig van
Beethoven and Felix
Mendelssohn have since used the fugue in some of their