As an overview, you can understand it as the student being involved with 3 separate parts:
Class enrolment (Remove student from class)
Finance (Settle any outstanding fees. Also, convert deposit to credit note, if applicable.)
Student profile (Update to inactive)
Go into the class page and directly remove student from the class OR add an end date for the student in the class page (this will cause the system to remove subscription to stop future invoicing)

Convert deposit to credit note (if deposit is collected)
Ensure there are no outstanding invoices by viewing the Finance page on student profile (void any invalid invoices if needed)
Update the status on student profile from Active to Inactive

Finally, update the status on the withdrawal request from Pending to Processed