die Lektion
lesson
A teaching unit at school, in a course, or with a teacher, in which knowledge is taught.
Heute haben wir in der ersten Lektion Mathematik.
Today we have mathematics in the first lesson.

lesson
Loading your saved state.
lesson
A teaching unit at school, in a course, or with a teacher, in which knowledge is taught.
Heute haben wir in der ersten Lektion Mathematik.
Today we have mathematics in the first lesson.

The word 'Lektion' (lesson) can refer to class time or to a part of a textbook. The context makes the difference: time expressions like 'in der ersten Lektion' (in the first lesson) refer to the class, while 'Lektion 5 lesen' (to read lesson 5) refers to the book.
In der nächsten Lektion sprechen wir über die deutsche Geschichte.
In the next lesson, we will talk about German history.
The idiom 'jemandem eine Lektion erteilen' (to teach someone a lesson) is very common. The person being reprimanded is always in the dative.
Der Chef hat dem unhöflichen Mitarbeiter eine Lektion erteilt.
The boss taught the rude employee a lesson.
When 'Lektion' (lesson) describes a learning experience, it is often combined with negative adjectives to characterize the experience. Typical phrases are 'eine harte Lektion' (a hard lesson), 'eine bittere Lektion' (a bitter lesson), or 'eine teure Lektion' (an expensive lesson).
Die Prüfung nicht zu bestehen, war eine harte Lektion für ihn.
Not passing the exam was a hard lesson for him.
To express for whom an experience was a lesson, a dative construction is used. The person who learns is in the dative.
Dieser Fehler war mir eine wichtige Lektion.
This mistake was an important lesson for me.
hour
'die Stunde' and 'die Lektion' can both mean a unit of learning. 'die Stunde' usually means a class period in a schedule, for example a school lesson or course session. 'die Lektion' more often means a learning unit with specific content or a chapter in a textbook. The words can be confused because both occur in the context of classes. If you are talking about the time in a course, 'Stunde' fits better. If you are talking about the content or section in a book, 'Lektion' fits better.

Für morgen sollen wir die dritte Lektion im Deutschbuch lesen.
For tomorrow, we are supposed to read the third lesson in the German textbook.
Heute fällt die letzte Stunde aus, weil die Lehrerin krank ist.
The last class is canceled today because the teacher is ill.