Click the "Withdraw" link from the course account view
For more information on how to navigate to the course account view, please read How do I view active and inactive courses?.
Acknowledge warning and click "Yes, continue"
NOTE: Withdrawing from a course will block you from accessing the course and all data associated with that enrollment. You will no longer see the enrollment in your list of enrollments.
If you have multiple enrollments in a course (e.g., one an Instructor role and another Student role), then withdrawing one enrollment will not withdraw other enrollments in the same course. Each enrollment needs to be withdrawn individually.