The goal of a conference is to meet as many people as you can in your field, and to thus open the door to new opportunities. The best way to meet people at a conference is to not hang out with people from your own lab. Try to introduce yourself to other graduate students, post-docs, and professors.
If you need more publishing opportunities or people who will serve as a consultant for a grant, a conference might be the way to find new collaborations. If you will be in the job market soon, going to a conference and introducing yourself to people with whom you will be applying to work with in the future could give you an edge over other applicants. Meeting older graduate students who have gotten F31s or NSFs in you area could help you seek mentorship to get these grants yourself.
You can approach people by going to their talks/stopping by their poster booth and introducing yourself, expressing an interest in their research. If you want to make sure they remember them, asking for something that will require for you to reach out over email (ex- ask if they can send a copy of their presentation, or an article that’s in press). You can also network before the conference, by looking through the list of speakers and emailing the ones that you are interested in meeting, telling them that you will be at conference and suggesting to briefly meet for coffee.