The circle of fifths is a handy device that shows the relationships of the twelve tones of the chromatic scale and their corresponding key signatures (major and relative minors)....
....The circle's design is helpful in composing and harmonizing melodies, building chords, and moving to different keys within a composition.... (from Wikipedia - the free encyclopedia)
Starting at the top of the circle, the key of C Major (or A minor) has no sharps or flats. Going up 5 scale steps, or a fifth - the key of G major has one sharp; going up 5 scale steps from G, the key of D has 2 sharps, and so on. The key of A major has 3 sharps, E major has 4 sharps, etc....
Similarly, going counterclockwise from the top, we are descending by fifths - the key of F major has one flat, the key of Bb major has 2 flats, and so on.
At the bottom of the circle, the sharp and flat keys overlap. These are enharmonic spellings of the same key; i.e., B = Cb - F# = Gb - C# = Db (they are the same pitches or musical tones.)
The following example is simple bass line making a full cycle through the circle of fifths. The sequence of 4ths and 5ths flows naturally from one to the next.
In this example, chord symbols and slash rhythm notation are added are added in the right hand. This is a common way to write parts for chord players (piano or guitar.)
In this example, the right hand part has the chord symbols notated on the staff.
The following example is simple bass line in the key of A minor. This also follows the circle of fifths.
In this example, once again chord symbols and slash rhythm notation are added are added in the right hand. This is common for chord players.
This example uses the same chord progression but has a basic, simple melody added in the right hand.