Except for Professional Education courses there is no cost for taking edX open courses when you enroll in the free audit track, which does not offer certificates or provide graded assignments.
However, if you want to be able to earn a certificate for a course and complete assignments, there is a fee that will vary depending on the course. You can confirm the price of an edX open course if you click Ways to Enroll on the course enrollment page.
You can find more information about the different certificates offered by edX: What types of certificates does edX offer?