If you choose to take a course for free, you’ll have access for the duration of the course plus 14 days, even if you join after the course opens. You can see when free access to your courses expires in Your Courses.
For example, when you join a 4-week course, you will be able to access it for 4 weeks (the duration of the course) + 2 weeks extra, even if you join after it first opened for enrolment.
If you'd like to study the material after your free access expires, you can purchase an upgrade to give yourself unlimited access. You can find more information about the difference between free and upgraded courses in this article: Free courses, upgrades and courses you pay for