An SSL certificate also known as a digital certificate helps establish a secure link between the Client browser and the Hosting Server.
Self-signed certificates are created when you need to test your website using an SSL certificate. This is usually not recommended for Production use especially if your website involves sensitive data transactions.
This example is from IIS 8.5. Open IIS Manager and select your Server name from the Left Pane. Double-click on Server Certificates as highlighted.

Select the option for Self-signed certificates on the right as shown. Provide a suitable name for your certificate in the dialog box.

The list will show the created SSL certificate with the validation for a year that is issued to the Server.

Add this certificate to your website with binding it to port 443.
Since the certificate is issued to the Server, you might get a certificate trust error in the browser. You can just continue to the website to test further.
To get rid of this error, you’ll need to create either a SAN certificate or a wild card certificate as per your needs.