An active user is defined as someone who can access a course. If the course is closed the users in this course are not active. If the course is open but their access has ended (by setting an expiry date) they are not active.
So they only classify as Active when they have not been set an expiry date and the course has not been closed.
The determining factor is whether they can access not whether they have accessed.
You can see the number of active users at the Organizational level in the admin (Settings > Reports > Active Users)