You can use a join code to enable self-enrollment in your course Settings.
Click the Settings link.
Click the Course Details tab.
Click the More Options link.
Click the Let students self-enroll by sharing with them a secret URL checkbox [1].
If you want to add a enrollment link to the course home page, click the Add a "Join this Course" link to the course home page checkbox [2].
Click the Update Course Details button.