Choose your professors wisely. Just like an onground class, some professors are better than others at teaching online. This is far and away the best of the 5 online courses I have taken. The instruction quality made the biggest difference. Your ability to interact on line may be constrained by your writing and typing abilities.
Online courses require self-discipline.
Even when there are definite deadlines, you must make yourself go do the work. Online learning gets easier after you get used to it. Most online classes use a threaded discussion forum or bulletin board for class discussions. The way we can see people's facial expressions and hear their voices makes a major difference. You still haven't captured the teacher-student interaction that I get in the classroom.