Bach’s theoretical training differed from ours. Rather than identifying chords in terms of functional harmony (for example, I-IV-V), music education in Bach’s time focused on intervals above a bass line.
This particular method teaches students the skills to improvise and to compose with greater facility than does the training of later composers.
A very simple summary of this approach is encapsulated in the “Rule of the Octave.” Basically, the premise of the Rule of the Octave is that there are chords in motion and chords at rest. Certain bass notes ask for motion, and other bass notes ask for repose.
This video will explain the concept, hands-on, using the best-known and much-loved Fuga from the Sonata, BWV 1001.