Conferences serve two purposes: learning (L) and networking (N). Let's optimize these with a few simple tricks.
Before the conference
Plan which talks you want to see. (L) Go through the conference program and note the talks you really don't want to miss, especially if it's a big multi-track conference. You'll thank yourself later.
Contact a few people beforehand. (N) I did this twice and it gave wonderful results. Simply reach out by email to two or three people (perhaps the speakers of the talks you really want to see?) and ask them to discuss their field of interest with you over coffee or at the poster session. I love this trick because instead of going in a room full of strangers at the conference, I will go in a room where two or three people I share interests with are waiting to meet me, which makes the experience a lot less overwhelming. Go the extra mile and read a paper or two written by the people you contacted to have a deeper discussion about what they do.
During the conference
Take notes. (L) Taking notes during talks allows to focus on what the presenter is saying (as opposed to let your mind wander) on top of being a handy reminder for later. I like to aim for at least 3 keywords per talk, but when it's really interesting, I can write many pages. I also take notes of whom I talked to and what we talked about.
Don't skip the poster session. (N+L) The poster session is a good place to discuss your field with people, which is way more engaging than listening to a talk. It's time to gather some intel for your own research and to make connections. It's the ultimate networking event, don't spend it watching TV in your hotel room. Bring your networking cards!
Be a stranger in your own town. (N) If the conference is held in your own city, it's easy to stay home late and skip the first session, go home early, continue your social life with your friends and so on. Try to enter the mindset of an out-of-town attendee : have breakfast at the conference (if they offer it), hang out late with people you met there, go explore the city with someone you met there, heck, be their guide to the local breweries and restaurants!
Lose the clique (N). If you are at the conference with your lab buddies and always stick together, you will lose many opportunities to meet interesting new people. Make it a point to split up or invite new people to hang out with you.
After the conference
Read your notes and write a summary. (L) While the conference is still fresh in your head, it's time to go though your notes and write down some extra stuff. What was the highlight of the conference for you? Which new papers should you read? Have your opinion changed about something? Should you perform some actions?
Read the proceedings. (L) It's time to read the papers of those great talks that merit your attention.
I'm sure everybody have their own way of approaching a conference and there are a lot of other advices out there. Try some of them and let me know what works great for you!