A polyphonic composition based on one main theme or
subject is called a fugue.
To add, in music, a fugue is a contrapuntal
compositional technique in two or more voices, built on a subject that is
introduced at the beginning in imitation and which recurs frequently in the
course of the composition.