First, you need to contact your hosting provider to install the SSL, after this, you need to enable it in Magento.
To enable the SSL on your Magento installation, you need to go to Admin -> Stores -> Settings -> Configuration -> Web -> Base URLs (Secure):
1. Edit the URL in Secure Base URL from http to https:
2. Use Secure URLs on Storefront: Set to Yes to make all Storefront pages accessible only with https:// or SSL certificate.
3. Use Secure URLs in Admin: Set to Yes to make Admin accessible only with https:// or SSL Certificate.
4. Click Save Config.
Your SSL is activated!