They work in much the same way courses do on campus. When you first log in, you'll find the syllabus there, detailing the schedule, assignments, and the professor's policies. You'll also do some reading, take tests, and turn in your completed papers and projects online. A key difference is that your work will be organized around weekly deadlines instead of class meetings. You'll interact with classmates online as well, and regular conversation with professors can help you stay on track.
It's a good idea to log into your course regularly, but the amount of time you spend there is ultimately up to you. Just remember that it's important to stay on top of deadlines, as well as updates from your professor. Once you get a feel for the course requirements, and start working in it online, you'll have a better idea of how to manage your time there.