Notice that if you start on adjacent pitches and apply accidentals, sometimes you end up on the same note.
For example: "A" raised a half step becomes "A sharp" while "B" lowered a half step becomes "B flat."
Looking at the diagram we see that this is the same black key, but with two different names.
Notes that sound the same but have different names are called ENHARMONIC pitches.
Notice also that if there is not black key a natural may be enharmonic with an altered pitch.
For example: B sharp is the same note as C on the piano. And C flat is the same note as B because there is no black key between B and C.
The picture below shows many different names for the same notes. These