When a sharp is applied to a pitch it raises the pitch by a half step. When a flat is applied the pitch is lowered by a half step. This creates an interesting dilemma as is seen by the graphic below.
In this example, the pitches C# and Db end up residing on the same key of the piano keyboard. These two names actually lable the same pitch.
This concept can be confusing at first. How can one pitch have two different names? When I am teaching my public school students I describe it this way. I also have two names (a first and last name). At home, my wife calls me Ray, but at work my students call me Mr. Melograne. I am the same person, but it is more appropriate to use my first name in some settings and my last name in other settings.
This graphic shows the various enharmonic equivalences that exist across one octave of the piano keyboard. Notice that the dilemma also occurs in the places on the keyboard where there are no black keys. The distance between the pitches B and C is a half step. The same is true for the pitches E and F. Therefore, each of these pitches can also be named as the flat or sharp version of their neighboring pitch. If you want to really get technical, the other white keys can also be named as a double flat or double sharp pitch. When the term double is added to a flat or sharp it simply means that the pitch has been rais two half steps (a whole step) instead of one. I decided to omit these names from the graphic to avoid too much clutter.