die Abwesenheit
absence
The state of not being present or not being there at a particular place.
Während seiner Abwesenheit hat ihn sein Kollege vertreten.
During his absence, his colleague filled in for him.

absence
Loading your saved state.
absence
The state of not being present or not being there at a particular place.
Während seiner Abwesenheit hat ihn sein Kollege vertreten.
During his absence, his colleague filled in for him.

'Die Abwesenheit' (absence) is the noun form of the adjective 'abwesend' (absent/not there). The ending '-heit' is often used to form a noun from an adjective that describes a state.
Der Lehrer war letzte Woche abwesend.
The teacher was absent last week.
If you want to say who is not present, you usually use the genitive or a possessive pronoun. A very common phrase is 'während [jemandes] Abwesenheit' (during [someone's] absence).
Während der Abwesenheit des Chefs wurden keine Entscheidungen getroffen.
During the boss's absence, no decisions were made.
In the meaning 'das Fehlen von etwas' (the lack of something), the preposition 'von' + dative is often used to say what is not present. Alternatively, the genitive can also be used.
Die Abwesenheit von klaren Regeln führte zu Chaos.
The absence of clear rules led to chaos.
You can recognize the meaning 'geistige Zerstreutheit' (mental distraction/absent-mindedness) because it refers to a person's mental state, not their physical presence. It is often intensified by adjectives such as 'geistig' (mental) or 'völlig' (complete).
Sie hörte nicht zu und war in einem Zustand geistiger Abwesenheit.
She wasn't listening and was in a state of mental absent-mindedness.
attention
'die Aufmerksamkeit' and 'die Abwesenheit' are opposites here when 'Abwesenheit' is meant mentally. 'Aufmerksamkeit' means that someone is engaged and concentrating. 'Abwesenheit' then means that someone is physically present but mentally somewhere else. In class, at work, or in a conversation, 'Aufmerksamkeit' is desired; 'Abwesenheit' describes someone not really listening or not thinking along.

Wegen seiner inneren Abwesenheit hat Paul die wichtige Frage nicht gehört.
Because of his mental absence, Paul did not hear the important question.
Bei der Besprechung richtet das Team seine Aufmerksamkeit auf die neuen Aufgaben.
During the meeting, the team directs its attention to the new tasks.