A lesson is a single session, perhaps an hour long. A course is an organized sequence of many lessons. A course might cover the entire contents of a textbook.
Imagine a university physics student, enrolled in a four-year program. She is signed up for English 201, Calculus 201, Physics 241 and Electromagnetic Fields 303. She says "I am taking four courses."
In the U.S., universities officially use the word "course" in a different way. To a university, Calculus 201 is not a "course", it's a "subject." To a university, a "course" is an organized sequence of "subjects." Nobody observes this usage in everyday life.
"Course" is short for "course of study," and is thus related to other meanings of the word "course." Fundamentally it means "a path in which something run." A racecourse is one example. So is the course of a river. Related words include "courier" (a runner who carries messages), "current" (running water), "corsair" (a fast ship used by pirates).