You should be able to enroll in a course using the enroll in course menu option through your user settings menu. Are you not seeing that from your menu? See our document How do I join a course? for a visual reference of the process.
The code should have been provided by the teacher to the students to enroll in the course.