For a long time (say, below class A), you'll pick up what you need to know as you go along. Don't study openings, play through annotated master games. After seeing the French a few times, you'll know it's the French :-)
After a serious game you could lookup the opening in a database or some encyclopedia to see where your game diverted from the really popular stuff, and try to understand the difference, but it's not really essential for a long time to come.
If you work on improving your chess in general (those principles, but also tactics, making a plan, trying to prevent him from carrying out his probable plans, et cetera) then over time you'll find you can often work out something pretty close to the main line behind the board - they're the most popular moves for a reason.
OK, it does not take long as a beginner to realize that openings are important. Fischer started most games with e4 which can transpose into a million (it seems like) variations.
For white especially, it seems that for all 16 pawn openings and two different knight openings, there are "named openings" and for many openings there are 5 -- maybe even 20 books written.
If not books, then sites like this have a forum like this one with vast discussions of openings. Now this part scares me. According to my rating with the USCF, I am an advanced beginner. Probably a good evaluation of my meager skills.
What scares me is that many masters can name almost every opening. That is the French, that is the King's Indian, that is the London, or Polish, and so forth.
Josh Waitzkin while being an IM, says his biggest asset was the ability to learn. Chess, now Tai-Chi. Wow, I have looked and the bazillion (that word is now in the dictionary, hmm...) openings and figure I could learn one or two good openings for white and maybe one or two for black.
From there, I have to play by "principles". You know the basic ones, try not to move any piece twice before castling, move only two pawns, develop knights before bishops, and fight to control the center.
So I have a question. How important is it to learn 5 -40 openings for each side?