when memorizing music, what is it that they're memorizing?
is it the music like all the note/chord names (like E E F G G F E D C C D E E D C)? the piano keys? muscle memory?
The best musicians will memorize much more than that. As a piano player in undergraduate, my instructor had me memorize the music in several different ways:
I'm sure others may have some more extreme steps they take for memorization; I guess the ultimate would be to rewrite the score, but I've never felt that was necessary.
I have, however, found it helpful to have people ask me various questions at any point in the music: "What part of the form are we in?" "What chord is this?" And so on.
In my experience, it's impossible to know too much about a piece; the more you know, the better!
Think about an actor memorizing a movie script. You certainly don't memorize the letters. You could also memorize the words, but even that would lead to a pretty poor recital. You memorize it at a sentence level, with the intent of also conveying a certain "feeling" that goes along with the words.
To tie the comparison together, individual notes in a piece are like the letters in a script. Chords, and some phrases are like words. Putting many of these together forms a musical 'sentence' and this is the level where many musicians remember a musical piece.
It couldn't possibly be the note names. There would be too many to recall, and apart from that, piano players usually don't think in terms of note names, once the piece has been played a few times. It's more like patterns, fingering, chord shapes/voicings in the intermediate stages of learning. Then, as one gets deeper, where repeats go from and to, and eventually into interpretation of the music itself, when the actual notes are probably not even considered as individual notes, but the effect of different blends and passages are played, maybe in subtly different ways, to find effective ways of using that piece to actually say something musically.
Then, if it's a concerto, or piece where others are playing too, other factors creep in, like how to blend musically with the others, how to work with the conductor, etc. At that point, a lot of it will be muscle memory, but the interpretation will be uppermost in the player's mind, as the map of the piece could be ( but won't be!) automatic. As an aside, someone who is performing at that level doesn't need to be a good sight-reader; they have plenty of time to perfect a piece; but obviously, if they are, then the whole process is short-circuited to a degree. Chances are that they won't have the dots to rely on during a performance, anyway, so it needs to be totally memorised - apart from cadenzas, which may be spontaneous!
In many genres of music, there is a heavy reliance on repetition, which makes memorization easier.
For example, I mostly play traditional American fiddle music. Most tunes have 2 parts, sometimes 3, usually 8 measures each. Each part is repeated twice, then you start over. So an entire tune can be played in 30 seconds to a minute, to be repeated as many times as you choose. There are some tunes that don't exactly follow this pattern, but all follow some pattern of short repetitions.
As a result, memorization is this style is much simpler than in the longer concertos @Richard's describes, and it is expected that a competent player will play exclusively from memory.
For traditional fiddle music, the musician memorizes the tune by parts. You start with the first part (called A), breaking it down into musical phrases. Often, even the individual phrases contain repetition, varying only in the final chord or two. Once you've learned the A part, you start on the second part (B), again breaking it down by phrases.
The size of the phrase you learn depends on the skill of the player. Professional players can often learn a tune with only one or two repetitions. They are familiar with the patterns likely to occur, so they only need to listen for a few large patterns, and pick up on the few points where this tune varies from what they already know.
Intermediate players will usually learn a tune by blocks of 1-4 measures, repeated many times over. An intermediate player will be able to pick up one or two new tunes in an hour long workshop, although it won't necessarily sound great, and will be forgotten quickly without practice.
A raw beginner will usually need a tune broken down into individual notes, or at most phrases of two to four notes. Part of learning to play is learning to recognize larger and larger patterns of notes, making memorization easier.
I think it is personal.
I rely on the melody and the feeling. The others, notes, kystrokes, etc. I have to derive from that feeling. When I played piano everybody knew my mood when I was practising.
I can imagine others rely on notes first and they derive the rest from that. Another group may rely on muscle memory. I cannot see in their minds, so I cannot proove.