If you're not one of those lucky people who naturally memorises, then you're probably doomed to frustration and despair by the "play it over and over again" advice.
But there is a way that really works! I discovered it about 5 or 6 months ago at the age of 51, having been convinced that I probably couldn't even memorise baa baa black sheep!
I was searching around for the same answer, partly because I felt that I was not able to play more advanced pieces up to a good tempo with my eyes glued to the score (which some misguided teacher in the distant past had insisted upon and which became a deeply ingrained habit) and also I felt idiotic that having reached grade 8 standard some years ago I could play virtually nothing if I happened on a piano away from home, unless I just happened to have a suitcase full of piano scores with me.
I came across this site;
www.pianoforum.netin which there is masses of advice and debate about memorization and practice techniques. Use the search function and in particular look for contributions by Bernhard, which I have found enormously helpful. Here is a link to a lot of his stuff;
http://pianoforum.net/smf/index.php/topic,5767.0.htmlWhat I learned to do,(a very brief summary) is;
to learn by heart from the beginning;
to aim
always to play it right, therefore it's necessary ....
to choose a
very small section to learn, hands separately. This section should be so small that after investigating the fingering and arm movements necessary to play the notes at full tempo, after playing it 7 times
with full attention it should already be memorised and up to speed. If not, cut it in half and try again. You may end up with a bar or less. If this is all your short term memory can hold, then so be it. Then you really start to practice this short bit HS, alternating hands frequently, for not more than 20 minutes. (Less if you're down to 2 or 3 notes!) Then you go on to your next small chunk, remembering to include an overlapping note. You proceed like this for your available time working on these small, overlapping chunks, practicing each for not more than 20 minutes. You aim to play HS faster than the required tempo. You do not try to join the small chunks yet. (This takes willpower!) If you can put hands together at this stage , from memory and at final tempo on each small chunk, all well and good, but if not keep to HS. You then
leave it. It seems your brain needs an overnight sleep period for the new stuff to start working its way into longer term memory.
Next day you sit down full of enthusiasm ... and quite likely can't remember the first note! (Apparently this is normal, I thought it was just me.) So you repeat yesterday's routine, only now you can relearn each of yesterday's small chunks much faster and so you have time to add some new chunks in the same way. And similarly the next day, though by now your hands are itching to join a few bars and the chunks that you first learned HS you may be able to play HT without too much loss of tempo,
IF you really have practised the correct fingerings and movements HS. It may take several days or before you can just go to the piano and play a connected section, depending on the difficulty of the piece.
As your sections slowly grow, you incorporate all sorts of other techniques to help ingrain the notes, such as very slow practice, alternating fast and slow, repeated note groups, rhythmic variations etc. You don't have to start at the beginning of the piece, in fact it's advisable to identify and learn the most technically difficult sections first as these will take the most practice.
It feels very frustrating at first to work in such small chunks because we all want to play the whole beautiful melody and harmony straight off and it's tempting to relent and just sightread the piece again. I find to my cost Iattempt to cut corners my brain remembers and repeats the errors oh so well!
Being able to analyse the structure of the piece and listening to as many recordings as possible is hugely helpful and I know there are many different approaches to memorising. But for me the basic way above has transformed how I practise and I've gone from zero pieces memorised over more than 10 years to four pieces of grade7 or 8 standard over the last 5 months. I hope this helps.