ThereFor this, we'll just look at examples in 12 tone Equal Temperament, where are 12 unique notes that repeat every octave. A majority of scales in music contain 7 notes. Each scale degree gets a letter from A to G based on the root of the scale and type of scale. The naming convention for the 12 notes makes the C major scale have no accidentals in it. Using the scale pattern for major the C Major scale has the notes C,D,E,F,G,A,B,C
and can be seen below.
Typically someone will write the enharmonic equivalent of Bbb (A) to avoid someone reading double flats.
The above is show within the context of Equal Temperament, but the idea is the same if not more important in other temperaments. The only difference is that in other temperaments is not all the harmonic equivalents used above are the same frequency so the distinction is much more important as writing for example an A♯ vs a B♭ will sound different.