A fugue itself is a strict form of counterpoint (the relationship of notes placed against other notes over the course of time). Fugue does not refer to any particular instrumental combination, nor to any particular time period, style or genre. Strictly sp;eaking, fugue is a composition technique as well as a composition that employs fugue technique.
The narrative of a fugue is at its basic level, an elaboration of a particular theme, known as a subject, that through the course of a movement or composition is developed through imitation. In a nod to ritornello form, developments of the theme, known as expositions, are interrupted by episodes. In the case of a fugue an episode is a more freely composed, though still contrapuntal, variation on parts of the theme. There also can be episodes in a fugue in which the theme is entirely absent. One can think of the form of a fugue similarly to ritornellos and solo episodes in a concerto grosso. As in ritornello form there is no set number of expositions, nor is there a set number of episodes.
Composers have developed numerous ways to deal with a fugue subject and various methods of arcane compositional techniques for fugal counterpoint. Indeed because of these numerous principles and techniques, fugue has come down to us as a learned form ennobled through its complexity and demonstrative of high compositional technique.
Some important terms are described below:
Subject: The Theme of the fugue. This is usually what is heard monophonically at the beginning of any Bach fugue.
Countersubject: After the entry of the second instrumental voice in a fugue, the voice that first presented the subject continues. This continuation is known as the countersubject as it is played in counterpoint to the subject.
Themes can become boring and so composers have developed methods of varying their presentation.
For instance, let's say we have a fugue subject (play).
This theme can be played backwards and still be considered the theme, this is known as the retrograde(play) of the theme.
One can also turn the theme upside-down, this is known as the inversion. In this case at every point that the original theme would ascend, the inversion would descend by the same amount and when the original theme descends, the inversions ascends by the same interval. (play).
Of course the retrograde can also be inverted to create the retrograde inversion
One can also change the duration of each of the notes of the theme. This is known as augmentation. This example doubles the length of each note of the theme.
As you might expect, augmentation has an opposite, known as diminution in which the length of each note of the theme is shortened. This example halves the duration of each note.
There are even more complicated ways of working with the theme but they are just that: more complicated.
The sonic glossary has a well illustrated entry for fugue.
Another good anatomy of a fugue can be found