The circle of fifths (or fourths) is theoretical music concept whereby all key signatures and thus chords are linked together through this one endless circle. This works as it shows how closely related keys are to one another, for example at 12 o'clock on the circle is C major; following this to the right (1 o'clock) is G major which is the dominant (5 chord) to C, these are similar keys as G major has only 1 sharp compared to C major which has none. Similarly if you move to the left of C major by one (11 o'clock) you arrive at F major, also similar as this has one flat compared to C.This is applicable to Bach chorales and composition as the most tonal chord progressions and modulations follow this circle of fifths i.e. vi ii V I is a typical chord progression in both tonal composition and Bach chorales as vi is the dominant of ii which is the dominant of V which is the dominant of I. It is important to understand well the concepts of writing tonal music so that you can later break the rules to produce a greater effect in regards to chorale harmonisation and/or composition in general.