To leave the class, once go to classroom.google.com. Then, click on More to select the unenroll option. However, you cannot unenroll yourself if the class is being archived by the teacher.