Mark an enrollment completed, on hold, or withdrawn
Open the student → Enrollments → use the buttons on the program row: "Mark completed" (= graduated, sets the end date), "Put on hold", or "Withdraw" (asks for an optional reason and withdraws the courses under it too).