To have the option to sell memberships on your website, please go to Store -> Products -> Add Product.
You have four options to choose from, select Membership.

When you create the product, you have the standard fields that you need to fill for the product. The special option here is to assign a member group that will be assigned to the user that purchases the membership. They will automatically be assigned to the group after a successful purchase.

To make the purchase a subscription, enable the Subscription Product checkbox below the Price section. There, you can select the period of the subscription, the length, and the cycle:

You also have the option to assign a special Thank You page when someone purchases the product. You can include a button with a link to the secured content for that membership group.

Upon purchase, the user will be assigned to the groups selected for the product. They will receive an email with a link to the Group’s redirection URL that you can add for each page.