You can unenroll from an edX course at any time. View edX's instructions on unenrolling from a course.
There are absolutely no academic penalties associated with incomplete edX studies. You can enroll again for the same course (if it is still offered) at a later time.
If you are interested in obtaining a refund, view our FAQ on edX's refund policy.