To flat (b) a note means to lower it 1/2 step. So, Cb means the note C lowered 1/2 step. To sharp (#) a note meas to raise it 1/2 step. So, E# means the note E raised 1/2 step. We have those keys because they are a part of major scales and because those notes can have scales built on them.
For example, the C# major scale:
C#, D#, E#, F#, G#, A#, B#
Now, if you recall the formula for the major scale, it's WS WS HS WS WS WS HS. Also, each letter of the alphabet can only be used once. If you were to call E# an F, it would violate those rules because then you would have an F and an F# in the same key. That is not allowed, lol.
Another example, the Cb major scale:
Cb, Db, Eb, Fb, Gb, Ab, Bb
If you follow the major scale formula and the rules for the major scale, you see that this is indeed a legit major scale. There is also sheet music written in this key.
Is that good enough?