The example on the piano diagram below shows the Eb note highlighted.
From the piano diagram above, you can see that all black notes have two possible names - a sharp and a flat name.
The choice as to whether a black note takes the sharp or flat name depends on the scale or chord being constructed that uses that note.
But crucially, these two notes sound the same - it is just the note names that are different.
In music theory, it is said that these two note names are enharmonic to each other.
The white notes are shown with a single note name from A to G, with no sharp or flat signs. They are called natural when they do not have to be sharpened, or flattened when constructing a scale or chord.
Be aware that white notes can also have sharp or flat names.
Again, depending on the scale being constructed in a particular key, either name could be used.
When constructing scales, it is theoretically possible for a note name to have a double sharp, that is adjusted by 2 half-tones / semitones / piano keys up or down.
However, both of the scales are rarely used and are difficult to work with, so the scales Eb major scale and Bb major scale are often used in their place, which contain the same note pitches as the other scales. ie. the scales are enharmonic.
Given a pair of enharmonic scales with identical pitches, it makes sense to use the scale that has the fewest sharps and flats.
When constructing chords, it is even possible for a note name to have a triple accidental, that are adjusted by 3 half-tones / semitones / piano keys up or down.