You can cancel your account at any time through your account settings. You will still have full access for the remaining subscription period. For example: if you purchased a yearly subscription in December but canceled two weeks later, you will still have access until the following December.
Cancelling will stop automatic billing. You will not lose any course progress should you choose to resubscribe in the future.
Monthly subscribers may see the option to "pause forever". This is the same as canceling. If you are a monthly subscriber and are interested in pausing your account, read more about pausing.