Go to your professor’s office hours
It can be once, twice, or maybe you drop in before class at random. Meeting with your professor shows that you are an interested student, that you want to do well, and that you are there to learn. Office hours are often held before or after class, making it easy to stop by for a minute.
It won’t be the best conversation, probably. You’ll either be nervous or not sure why it’s going so well, but you will be there and trying, which is more more than most could say.
In my experience, the length of a conversation I had with a professor was equivalent to the amount of help I got when I was in a jam with understanding an assignment, a final, or something that came up in class.
There won’t be special treatment, but you will learn more and do better.
A brief hello is nice, too.
Show how you feel about being there and what you hope to gain from the class. If it’s out of your major, you can still joke around a bit with your professor. They don’t have to see you as a future Einstein to teach you some physics in a fun way, they only need a person who is ready to learn.
If the class is in your area of interest, then get to know your professor who is a part of the field you are going into. College is a time to figure out what you want to do, and knowing them will come up again when you apply for graduate school or post graduation jobs, so be nice.
As a teacher getting to talk to my students was one of the best parts of the job. There are a few grumps out there, so keep in mind that not every professor is happy to talk, or even help. Some, however, will end up becoming friends.
It’s the best advice I can give for anyone hoping to really gain some knowledge in college. Learning takes work that goes beyond text books and assignments, and getting involved with the people who enjoy it and see its benefits (and teach it) is one way to engage in learning.