To have the option to sell membership in your site please go to Store -> Products -> Add Product
You have four options to choose from, select the 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.

You also have the option to assign a special Thank You page when someone purchases the product. You can include a button with 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 Groups redirection URL that you can add for each page.