A piano keyboard may look confusing at first, but the layout of piano keys is actually very simple. While it would be nearly impossible to identify individual keys if all we had were the white keys, the pattern of black keys makes it easy to identify the keyboard layout. The black keys are arranged in alternating groups of two and three:
(It's not unimportant to point out that, in the piano's early days, the "white" keys were black and the "black" keys were white! It was not until the 19th century that the now-common standard became universal.)
In fact, all you really need to recognize is this:
These are all the keys within an octave, and this pattern repeats itself seven and one third times on a modern piano for a total of 88 keys.
Now, most teachers will introduce you to the white keys at this point, starting from middle C and going up: D, E, F, G, A, B. But this isn't the whole truth.
There's one critical thing to note here. The keys are not the notes. That white key immediately to the left of each group of two black keys is not C! Well, it is and it isn't. It could be C; in fact, this key spends most of its life playing C. But it could just as well be B-sharp, or D double flat. (See the Piano Key Chart for an overview.)
In order to understand this point it's vital to understand something essential about the nature of the piano: The piano is inherently one giant compromise. You see, C, B-sharp and D double flat are not the same note, but they correspond to the same key on the piano. (English speakers might be confused by the fact that "key" is used for both the white and black buttons on a piano as well as in harmony, e.g., the "key" of C major or F-sharp minor. Other languages happen to use entirely different words for these concepts, which have no relation to one another.)
If you're confused by sharps and flats, just remember that sharp means to play the next higher key and flat the next lower.
A set of notes that correspond to the same key on a piano is called enharmonic. (Don't worry about this term for now if it sounds confusing; just know that you'll encounter it later.) For example, F-sharp is enharmonic with G-flat. Enharmonic notes aren't technically the same, but they're "close enough" not to matter all that much to justify making them a discrete piano key. After all, you'd have to triple the number of keys just for the sharps and flats, and that would make the piano impossible to play, not to mention a piano tuner's worst nightmare!
There is something special about the layout of piano keys of which even most experienced pianists are unaware. There are two points on the keyboard on which a mirror could be placed, and the pattern of white and black keys would be the same in either direction.
The first of these points is the white key right in the middle of the group of two black keys:
Place both hands on that key. Now play the next higher key with the right hand and the next lower one with the left. Keep doing this, and you'll soon discover that you could go on forever like this, and both hands will always play either a black key or a white one. (Each hand just played a chromatic scale, by the way.)
Challenge: See if you can find the other mirror point!
Now let's familiarize yourself with the piano keyboard. Take your index, middle and ring fingers in each hand and play every group of three black keys.
Next, using your index and middle fingers, find each group of two black keys.
Now try this exercise without looking at the keyboard! This is how blind pianists are able to play, incidentally: They know the layout of piano keys from the groups of two and three black keys. It is also the proper sight reading technique.
Now that you've familiarized yourself with the layout of the piano keyboard, you're ready to move on to the Piano Notes Chart.... See you there!