An accidental is a symbol used to lower or raise the pitch of a note.
♯ A sharp raises the pitch 1/2 step. It moves the pitch the equivalent of one key higher (to the right) on the piano keyboard.
𝄪 A double sharp raises the pitch one whole step. It moves the pitch the equivalent of two keys higher on the piano keyboard.
♭ A flat lowers the pitch 1/2 step. It moves the pitch the equivalent of one key lower (to the left) on the piano keyboard.
𝄫 A double flat lowers the pitch one whole step. It moves the pitch the equivalent of two keys lower on the piano keyboard.
♮ A natural cancels out the previous accidental.
The letters of the musical alphabet represent the white keys on a piano 🎹. The only way to notate the black notes on the piano keyboard is to use accidentals.
The sharp moves a pitch up one key on the piano. In most cases this will be from a white to a black key or visa versa. Notice that at C and E on a piano a sharp will move it up one note to another white key.
The flat moves a pitch down one key on the piano. In most cases this will be from a white to a black key or visa versa. Notice that at E and F on a piano a flat will move it down one note to another white key.
The double sharp and double flat work in a similar manner but move the pitch the equivalent of two keys.
Notice that every key on a piano has more than one possible name: G♯ = A♭, A♯ = B♭ and B♯ = C. When you use double flats and sharps it gets even more interesting: A = G𝄪 = B𝄫
Two different names for the same pitch are called enharmonic pitches.
To review Note Names see The Treble Clef and The Bass Clef.