Not just music either. A long time ago I learned all the parts to a (slightly modernised version of a) medieval mystery play. (i.e. based on Biblical events and chock full of moral lessons. An old style audio-visual presentation.)
It has to come from the heart. And there are 15-20 minute monologues to memorise. Those are the tricky bits.
So, first you learn them until you are word perfect. Then you continue learning them until all the appropriate emotions and understanding are in place. Then you continue learning them until they are a part of your personality and when you tell your stories you are no longer acting - rather they come as naturally as recounting an incident that happened to you yesterday.
At this point it is easy to drop into that dream-like state where it happens on auto-pilot and your awareness is not necessary. If you're not careful you can start thinking about what you're having for dinner later while you're still chatting away and then suddenly realise that you said "steak and kidney pie" out loud by accident, to the general amusement of the audience.
Or, more usefully, you can step outside of yourself (and here I draw a parallel with lucid dreaming) and listen to what you are saying as an audience member might, but with the option to tweak your delivery a little here and there, just to bring the very best out of it.