To get a refund for a course, you unenroll from the course within the refund eligibility window.
For information about how to unenroll from a course, see How do I unenroll from a course?
In courses that offer the ability to change course sessions, in addition to unenrolling from the course, you have the option of changing to another session of the course, or leaving your session and waiting until another session that works for you becomes available. For these courses, if the refund eligibility period has passed (and you will not receive a refund when you unenroll), the unenroll option is not available. For more information, see How do I complete a course when multiple sessions are available?