The definite article is used in a couple of ways in Esperanto.
referential use
Referential use means being known by the context.
- Hej, ĉu vi prenis la librojn kun vi? : here both the speaker and the listener know which books are we talking about
As Joop Eggen points out here the correlatives (ĉi) tiu(j) make it easier to understand especially for speakers of languages which do not have articles.
generally known and unique
- La suno brilas kaj la ĉielo bluas. : the closest sun and the sky of this planet
categorical use
- La hundo estas la plej fidela de la bestoj. : here one dog represent dogs in general, as species
You can think of this kind of use to mean the same as with the correlative ĉiu(j), even if not directly replaceable with it. Your example falls into this category.
Note, that this use can sometimes be hard to distinguish from the referential use.
- La knabino kuras plej rapide de la infanoj. : here la refers to a particular girl and not girls as a category
body parts
Depending on your native language the use of the article with body parts can be really confusing.
- La kapo doloras al mi. : la denotes that we talk about my head
Note, that sometimes the reciever (al mi) is omitted, so that when the speaker says la kapo doloras, you should understand that they refers to their own head, and not to some generally known, unique head somewhere.
remark
One of the languages Zamenhof spoke natively was Polish which does not have articles, he stated for instance in lingva respondo 83B (LR83B) that whenever in doubt it is better to leave out the article.