The four kinds of memory are visual, auditory, analytical, and muscle memory. Visual memory means you remember what the notes look like on the page, and what position your hands are in on the keyboard, while auditory memory means you know what the piece should sound like. Analytical memory means you remember how the song is constructed; for example, the key and time signatures, chord progression, tempo changes, unique chords or accidentals, song structure (for example, AABBCCA), etc. Muscle memory means you have memorized the hand shape, placement, and force required to play the piece. Most pianists will tend to rely upon muscle memory for performances, but this isn't the best option, as you can easily blank out because of nerves. It's the safest to rely on analytical memory, as that means you have memorized the music in chunks with checkpoints throughout where you can start playing from any point in the piece.