The way I learned the few openings I now know is basically :
- Playing them a lot.
- In the (soon few) games where your natural play gives you a crappy position out of the opening, go ask theory™ where you screwed up.
Learning lines as you make mistakes in them helps a lot for remembering them, since you have to confront what you thought to be correct to what actually is.
I this the most important part of “learning openings”, far from being memory, is getting comfortable with the positions that are most likely to arise, and to know where you're going (i.e. have a plan to fall back onto when you're out of your book).
Eventually, you'll learn about the tricks and traps that lie around as you fall into them, or your opponent overplays and you fail to punish. But most importantly, you'll learn the positions you get to play often first.
Last but not least : always play the same openings you're trying to learn, and don't learn many at once (for obvious memory overflow reasons).
Note that I don't hold a very high opinion of opening theory, and tend to advise¹ most people to care a lot less about it, and rather improve their actual thinking and play. If you get a decent enough position out of your opening, then the fun begins (and that's where it incredibly helps to understand what theory got you into, what you're playing for, and what you should keep an eye on, etc.)
As to what I applied this to, as a 2000, I premove
1... Nf6 with black (hence Alekhine and Grunfeld defenses, sometimes falling into semi-Indian pseudo-systems), and vary between
1. b4 and
1. Nf3 with white.
¹ Of course, this is only meant to hold for people my advice is worth something for. I'm sure it doesn't apply anymore past some level, but then, people tend to ask these questions less, unsurprisingly.