This is a pretty broad question.
But you can follow some simple steps.
1. "What kind of player am I?"
This is the first question you should ask yourself. Do you like complicated tactical combinations that can give you attacking chances? Or your playing style is more quiet and you prefer positional battles, where you build your advantage little by little? Once you have answered this question, you can choose openings according to your preferences, finding positions you feel more comfortable with.
2. Black and White
To build a complete repertoire you may choose openings you like the most, and your choice should include openings for both Black and White side.
Instead of memorizing long sequences of moves, variants, and so on, I tend to privilege a different approach, more gradual and less "automatic". To help you in this work, you'd better have a general "opening book", or follow a general "chess openings website". It should cover the most common openings, giving you also explanation for each move, and maybe some example games. And last but not least, it should be recent, since theory is running fast.
You should start choosing your repertoire when you play with White, since it's easier.
Let's begin considering only the 2 more common moves for White, 1.e4
and 1.d4
.
Are you a tactical player? Do you like attacking your opponent's King? Then you should start with 1.e4
. Do you prefer positional play and a solid approach? Then go for 1.d4
.
Let's assume you chose 1.e4
. Now, what are the most common responses for Black? I think they are: 1...e5
(Open games), 1...c5
(Sicilian Defense), 1...e6
(French Defense), 1...c6
(Caro-Kann). Once you have found which are those responses, you have to face them ONE BY ONE.
For example, in case your opponent plays 1...c5
and goes for a Sicilian, what should you do with White? Again, find the most common choices: 2.Nf3
(Open Sicilian), 2.c3
(Alapin), 2.Nc3
(Closed Sicilian). Let's say you choose 2.c3
. What are the most common responses for Black? ...and so on.
To help you in your choices, read your opening book, and choose moves whose comments seem to adhere to your playing style (that's why step-1 of this answer is important). Never choose a variation just because it's said to be "the best" or "the most popular". Pick moves according to what you feel about it, unless there's a clear confutation to that move.
After you've have arrived at a certain point (after 2-4 moves), you should go back and face the next "mosto common choice" you've left behind. Now, let's assume that Black plays 1...e5
. What move should you choose? You find the most common moves, choose one, and go on a little bit. And again, and again, until you exhaust all those "most common choices" you left behind.
With Black you do basically the same thing, with the exception that you have to face from the beginning different first moves by White (at least, you should find your responses agaist 1.e4
and 1.d4
).
3. Learning, not memorizing
In this way, little by little you build some "trees" of opening moves, one for White and at least two for Black. Each branch of those trees is a "path", a choice you make when you make your move. But you should never "memorize" the move itself. You'd better learn the meaning that lies behind each move: "why you play this instead of that?" is the question you always have to find the answer to, when you study openings.
At first, your trees might be very short, and you might get confused even after sequences of 3-4 moves. But if you play regularly, you'll manage to master the openings you've chosen, and then you can deepen your tree-paths, add branches (variations), and choose many of them during the game, thus varying your game (and this will improve your playing strenght, since you'll run into different tactical-strategical situations).
When you'll feel more confident you can go and read books that focus on specific openings. You will widen your trees, play various kind of games, and learn that sometimes tactical-strategical ideas behind an openig are used also in a different opening. You'll learn evetually about the good and the bad in moves transposition, and how to manage them. But you'll have to work hard to get there. :)
Take just one step at a time. :)