Users can be assigned a role in a course without enrolling them in Settings > Users > Other users.
This means they can carry out tasks relevant to their permissions but they don't appear in the Participants list. An example of this would be assigning a user to a Principal, Manager or Helpdesk type role to provide them access without confusing the participants list.
Note that this page will also provide a list of users who have been assigned a similar role at Site or Category level.
- Using Moodle Moodle 2.0 hidden teacher forum discussion