You can cancel at any time. Just head to your account settings, billing, and then subscriptions. There is a short tutorial in the "Frequently Asked Questions" section of the course in case you cannot find out how to do it. Please see the Terms page for more information.
If you cancel your membership before the end of the billing period, then you will still get access to the course until the end of your billing period. So, for example, if you join on the 1st January, and then you cancel on the 25th January, you will still be able to access the course until the 1st February.