Body
The Attendance Activity allows Teachers to record the attendance status of a student. Use it to create sessions for specific times that your Students should be attending.
First, you'll add the Activity, similar to how you'd add any Activity in Moodle. You can decide if attendance will be graded or not, and what mark would be earned, etc.
Next, you'll create a new session for each attend-able event that you need to create. The "Add Session" tab is where you do that.
(The default setting for a new session will include all your Students.)
During either of these events, you will click the "green dot" button to take attendance, clicking on either "P" for Present, or "A" for Absent, next to each student's name.
This tutorial from the University of New South Wales provides a very good walk-through of how to set up and use the Attendance activity, with lots of annotated pictures:
https://teaching.unsw.edu.au/moodle-attendance-activity
This Moodle Docs page gives a very detailed explanation of this activity...
Attendance Module (Moodle.org):
https://docs.moodle.org/en/Attendance_activity#About_the_Attendance_activity