How to learn openings


The purpose of any opening is to get to a playable middle game. Your opening choice will depend on the types of middle games you want to play.
But until you reach a point where you have a firm understanding of that, you should start with opening principles:
Develop minor pieces toward the center.
Castle.
Connect your rooks.
Place your pieces on active squares.