How the keys are named
The white keys use seven letters, A to G, then start over. The pattern repeats up and down the whole keyboard.
The black keys are named from their white neighbours. The key just above C is C♯ (C sharp). The same key is also D♭ (D flat), because it sits just below D.
A way to never get lost
The black keys come in groups of two and three. Every C sits just to the left of a group of two. Every F sits just to the left of a group of three.
Find a C, and the other white keys follow in order: C D E F G A B. Do that a few times and the layout stops being a puzzle.