If you need to unpublish your course, click the Unpublish button in the sidebar. Students who already received course invitations will not be able to access your course.
Once your course contains a graded submission, the course status will no longer display in the sidebar and you will no longer be able to unpublish your course.