You can interact with professors in different ways. After class, if there are a few minutes, you can talk to your professor, introduce yourself, and discuss some aspect of the lecture. Perhaps you have a question or need an issue clarified. Office hours, like TxC wrote, is an excellent way to develop the relationship even further. You don't have to be struggling in a class to meet with the professor during office hours. I know many professors who enjoy getting to know their students, and professors can be excellent advisors and mentors. For example, you could ask about courses he or she would recommend in the future. Other options including doing research with the professor either on your own time or as a research elective. Some professors are advisors of student groups, and this can allow for the development of stronger relationships. Whatever you decide to do, make sure you stay in touch with your professor periodically after your course is over. Good luck.