as other said, they are just notation marks for sections of a song, also called "song structure".
in standard jazz pieces you'll have a theme/singing part made of a (typical) AABA, and after the theme/singing part, you'll repeat the structure as it is, and musicians start to improvise.
this thing is called "chorus" in jazz and blues notations, and the letters are used to distinguish the harmonic structure.
the typical "12 bars chorus" in the blues structure is the same thing, you are just repeating the same chords over and over again, starting from bar 1, ending on bar 12 and restarting from 1.
you can also name sections dividing by three:
for example:
||: E | A | E | E |
| A | A | E | E |
| B | A | E | B :||
this is a standard blues chorus. you can name the first four bars "A", the second four "B" and the last "C". you have three different sections, with different chords and harmonic structure.
jazz structures are a bit more complex (even if often they are just blues choruses with added chords in the 12-bars), but the concept is the same: you start with the A section, repeat the A section, go to the B section, play another A section and go back to the first A, and you'll loop AABA all over again.
you can obviously have a C part, that sometimes is an A part with some differences, or just a "turnaround" to go back to the beginning of the chorus.
naming the parts is useful if you want to change "on the run", and maybe restart after the B section to enter a final/ending chorus leading to the end of the performance.
it depends on how the song is written and how the band/musician wants to play it for the entire lenght.
in pop/rock music structures and notations are a bit different, because you can have more secitons, but you still divide them in sections basing on the chords or the melody (when chords are the same).
for example, a common pop/rock structure is
A A B A B C B B
A is the verse section changing the lyrics
B is the chorus/refrain with, usually, the same (catchy) lyrics every time
C is a bridge part with different harmoinc progression, often changing the tonality, or leading to change in the chorus (like going up 1/2 or 1 tone)
solos and intro/outro are usually done on the A or B harmonic progression.
then it's up to you. if a song is made of just two chords, or the same harmonic progression (like the over-used || C | G | Am | F || ) both on verse and chorus, you should note them basing on just the melody.
in more complex songs you can have breaks, solo parts with a different harmonic progression, even more than one bridge, and you can end up using, A, B, C, D and other notations (that usually are decided with every band member, not to confuse things
).
in non-professional context is easier to use names for the parts, like "verse", "bridge", "chorus", "solo", or even using the lyrics to distinguish them.
progressive music may not have a repetition at all, end we can end up talking about classical and opera music with anything but a repetitive structure***
in a professional contex is easier to see just letters, to be sure that every "group of bars" can be recognized immediately.
"
let's try the D section" is better than "
let's try the part when john sings ______ "
*** a nice example is the song "In Dreams" by Roy Orbison. it's structure is linear, never repeating a section. in these cases, you just name the sections with different letters (or the preferred way).