Traditionally there had been a clear distinction between Fahne and Flagge in German. The difference was based on two main facts:
a Fahne is fixed to a staff, whereas a Flagge is hoisted and is therefore mobile;
a Fahne is a single, precious item, that is revered individually, whereas the Flagge is replaceable and the hoisted specimen is not revered as an individual flag.
This is similar (but not totally equal) to the distinction between '(Regimental) Colour' and 'flag' in English. Historically it has the same roots: the Flagge is
the replaceable item hoisted on a ship, the Fahne is the precious sign of a military unit. As flag use became more widespread in the 19th century, especially when German states (and cities) not bordering the sea introduced flags, the distinction started to become less clear. For about the last 50 years one can say, that neither official authorities nor flagmakers have used the two terms in a consistent and straightforward way. For instance, the flags of counties and municipalities in Bavaria are officially called Gemeindefahne or Kreisfahne, although they are obviously Flaggen as defined above. Today there are mainly three different factors determining the use of either Fahne or Flagge:
the traditional definition;
the more unofficial a flag is, the more likely it will be called a Fahne;
the more inland one goes in Germany, the more likely a flag will be called Fahne.