Recently a few adult pupils have said to me something along the lines of "I've never been able to just sit at the piano and play a piece of music just like that without having the sheet music in front of me. How do you do that?" Here is a method I have shown them for starting to play from memory, which seems to be very effective.
First of all choose a piece of music that you have been practicing for a while and that you can already play reasonably fluently. You can memorise completely new pieces of music but if you're new to memorisation it is usually less daunting to start with a piece you already know how to play. Make sure the piece isn't overly complicated and has plenty of recognisable patterns and repetition in it. Also make sure it's a piece you really like the sound of. This is important because memorisation of music requires a lot of repetition and you will be more inclined to keep playing a piece you really love.
To get started with memorising the piece, break it down and simplify it. Start with a small section, for example just the first four bars. Play through the right hand only of these first four bars from the music a few times. Then remind yourself of your starting note, keep the name of that note in your head, and cover up the music. Then try playing those four bars of just the right hand without the music and see how far you get. If you only manage a few notes at first that's fine, it's a start. Look at the music again and see how far you got before your memory failed. Play it from the music again, making a mental note of any corrections you had to make to your memorisation attempt. Then cover up the music again and have another go at playing it from memory.
If you know the music really well, or it's a very simple piece you might find you can manage to play the first four bars from memory on the first attempt. If not, don't worry, it's probably a new skill for you which will take a bit of getting used to. Once you can play those first four bars of the right hand from memory, reinforce your work by playing that section a few times from memory.
Next you can proceed with the left hand of the first four bars in the same way. If the left hand has a chordal accompaniment it can be helpful to name the chords to yourself as you go along.
Once you have managed to play each hand separately from memory, do the same with both hands together, i.e. play the first four bars hands together from the music first, then cover up the music and attempt from memory.
After you have started to play something from memory the reinforcement stage is very important. This requires plenty of repetition of the music you are working on from memory, and referring to the sheet music whenever you go wrong.
There are many other methods of memorisation, this is just one to get you started. Also see my article called Memorising Music.
A couple of my memorised pieces: