On a KEYBOARD each key (of either color) is separated from the next by a HALF STEP
A Half Step could be made from a white note to a white note, but not from a black note to a black note!
In NOTATION notes are separated by lines and spaces.
There are keyboards where the color scheme is different. Harpsichords often have switched colors.
An ACCIDENTAL symbol placed before a note changes the pitch.
We still don’t know the pitches yet, but the added signs do something important.
The first sign (looks like the number sign) is a SHARP sign. Raise the pitch 1/2 step
The second, which looks like a B, is a FLAT Sign. Lowers the pitch 1/2 step
The bottom sign here is the NATURAL sign. This sign restores the note to it’s original pitch.
Using the Treble Clef sign we know the note on the second line is G.
Place a SHARP sign before the G and you raise it 1/2 step to G sharp.
The FLAT sign before the note lowers it 1/2 step.
Now it’s G flat.
If you saw a FLAT sign in front of a G, the note is now Gb. Every G after that is also Gb, unless there is a NATURAL sign placed before one, restoring the original PITCH. Starting a new measure also calls off the effect of the ACCIDENTAL.