Hi @SarahClark47 ,
On top of what @Chris_Hofer said about you still being in those groups for a good reason, once your school concludes a course, or concludes/deletes your enrollment from those courses, you will automatically be removed from the groups.
Some schools have it set up where certain canvas courses are still available after the semester/school year ends for a specific period of time before all enrollments within that course are concluded.
If they are student groups, and you freely joined those groups, you can leave those groups. To do this, open the course, select the 'People' link (if it is enabled by your instructor), click 'Groups' at the top of the page, then click the leave button. If you were manually added by your teacher or another user, you are unable to do that.
Hope that helps out a little too, but I think Chris covered everything.
Noah