On the piano
The keyboard shows the same seven notes as a shape you can see. The coloured keys are the C major scale, and you can click any key to hear it.
The steps, on one string
C major on one string: C D E F G A B C.
Counting up from the root, the steps are whole, whole, half, whole, whole, whole, half. A whole step is two frets and a half step is one. This pattern of steps defines the scale, and the letter names are simply the notes it lands on.
On the staff
On a treble staff, the C major scale is written C D E F G A B.
This is one octave of the C major scale, written on the treble clef. Guitar and bass music is written an octave higher than it sounds, and the small 8 under the clef is the sign for that.
The major scale has seven notes, chosen by a pattern of steps rather than by ear. Counting up from the root, the steps are whole, whole, half, whole, whole, whole, half. On the guitar a whole step is two frets and a half step is one.
If you start the pattern on C, it lands only on white keys, which is why C major is usually the first scale people learn. If you start it on any other note, the same pattern needs sharps or flats. That is where key signatures come from, and the last lesson of this course explains why they are spelled the way they are.
On one string the scale is simply that run of frets: 0, 2, 4, 5, 7, 9, 11 and 12. Every scale shape a guitarist learns is that same run folded across six strings.