How to prepare for attending first conference as an undergraduate?
I wish I had the benefit of this hindsight when I was an undergrad or even a master's student. It took a while for me to understand how conferences (at least in theoretical computer science) work. I speak from my experiences in attending top-tier theoretical conferences. It may vary in your case. But in short: most of what you'll learn will be outside of the talks.

To set your expectations right:


Don't expect to understand a lot from the talks. Reading those papers in advance might be even more boring unless you are already familiar with the background, or at least the starting assumptions, of the presented works. Seasoned researchers have a good idea of results being presented, i.e. the exact formal claim, and they attend the talks just to get a rough picture of the proof and techniques involved. It's like intellectual networking. Get an idea of who has done what and how. Maybe it's useful later.
Asking questions during the talks will be intimidating. As a rule, I always hold my questions for until a couple of slides later. It is always good keep abstracting the ideas presented, and not worry about the details. Details often don't get in the way of getting a rough picture, which is essentially what the talks are for.


Now, ideas for making the most from your attendance. In short: you are charting the territory of your future research, and getting to know the leaders and active researchers in that field. 


There are always researchers who have a reputation for nice talks. Make sure you attend their talks. Sometimes, all you learn is how to give a good talk. Which is not to be underestimated.
Go with at least some interest area in mind. Make a rough plan of talks you'll go to. Reach out to presenters during coffee and lunch breaks. Just chat them up. Really. Everyone is waiting to distribute pearls of their wisdom and are happy for dedicated audience. Even better if your professor can help you identify his peers or their students in advance. Go up to them and convey your prof's greetings. Ask how they got to doing what they're doing.
Make friends among other research groups. Hang out with other (also senior) students. Learn about their work. Grab a few drinks together. It's quite likely you'll see them again and even collaborate.


I don't think you first conference would be about gaining deep technical understanding about anything. You would have succeeded if you could remember at least as much as you do after a visit to a museum. This visit will be about learning how the community works, who's who, and what beer tastes like in that city.