well the aim of the opening generally to gain control of the centre of the board, but most importantly to develop your pieces so they are taking part in the game and not just sitting on the back rank. Also you must ensure you king is safe. I would suggest at least starting with 1.e4 as white as even if you decide to play a different first move in future, this is a great move that you can learn a lot by playing. Firstly, it sticks a pawn in the centre of the board, and this helps you to control the centre. Also, it opens lines for your King's bishop and queen, so is helping to develop pieces. Rule of thumb though, dont bring your queen out early. hmm, see some boards below...
you dont need to learn all those moves though, they are just to show you what good openings look like, and how the centre, and piece development dominate. Notice how there are very few pawn moves, generally only moving one pawn to start with, and only 2 or 3 for a long time into the game.
Another point is how pieces are only moved once if possible. Moving a piece already developed wastes time that could be spent developing a new piece.
Now for some bad openings...
so yeah, lots of stuff there, dont worry about learning great long lines though, just think about the principles. you'll find most of the bad moves by losing games
I am new to chess, I know the function of the game and how the pieces work! Could someone give me some advice to learn how to open? Thanks!