There are a number of reasons this might be the case.
1. If you have never been able to see the course you are looking for, please see: I cannot see my moodle course
2. If you had access and can no longer see a course during the CURRENT term, contact your instructor to find out if he or she has made the course inactive. Some classes do not require the use of Moodle, so many instructors will turn off a course if they are not using it. In addition, at the end of the semester, classes are usually backed up and set inactive by the instructor as a part of managing their courses in Moodle.
3. If the course in question was from 2 or 3 semesters ago, it has most likely been included in the routine archive cycle and been set to 'inactive'. These 'inactive' courses are invisible to students, but still accessible by the instructor. In many cases, the instructor will make the course available to you for a time period if you need access.
4. If the course is more than 1 year old, it is safe to assume that it has been deleted from the system. There are many thousands of courses created in the LMS each year, and we cannot simply leave all of them online indefinitely. As a best practice, courses that are over 1 year old are removed from the live server. Please note that we do not delete the archived courses until 1 full year has passed and we do maintain backup copies of courses for up to 5 years in accordance with the university data retention policies.