If you are a teacher in a course: Go to Settings > Course administration > Users > Enrolment methods. Disable (close the eye) of the self-enrolment option. If you are site admin: Go to Setting...
Enrolment is the process of assigning user to roles in a course. Moodle provides a number of ways of managing course enrolment, called enrolment plugins. They are: Manual enrolment- the administrator ...