Written notes can be altered in pitch by accidentals. There are three main accidentals: sharps, flats and naturals. A sharp symbol raises the pitch by a half step and a flat symbol lowers the pitch by a half step.
For example, there are four notes displayed on the staff below. The first note is F, followed by F#. The third note is G, followed by G#.
An alternative name for F# is Gb and an alternative name for G# is Ab. Below shows the same sequence of notes:
A flat or sharp is written only once and apply to all proceeding notes on the same line or space on the staff. The above example shows a flat symbol on the second note, Gb. Any note placed on that same line would be a flat without the need to place the flat symbol. The effect of the symbol can be countered by the natural symbol. Without the natural symbol on the third note (shown above) the sequence of notes would go F Gb Gb Ab.