Okay, I'm voting for this thread to be in "Hall of Fame" just for Ustwo's post.
As to the question, what I've found works best is, if it's a class related to your major, then there will likely be people that you've had classes with before, and will see repeatedly, giving you a chance to open the door. You can either ask them what they've heard about future courses that you'll have to take, or what really works well is griping about a class or professor that has proven to be pretty bad for anyone who took that class/class with that professor. I always tend to be early to class by at least 10 minutes, which means another class is usually in session in the room at that time. Others from the class tend to show up around that time and you can start up conversation there. And it doesn't have to be anything complicated. Just talk about a test, homework, or anything else related to the class. And make sure just to make some jokes about the class in some aspect.