You need to generate your own self-signed certificate or request a certificate to a Trusted Authority. After this you will get the .key (the private key of the certificate) and .crt (the public part of the certificate)
To create a self signed certificate follow this link How to create a self-signed certificate with openssl?
You will need openssl
openssl genrsa -des3 -out server.key 2048
openssl rsa -in server.key -out server.key
openssl req -sha256 -new -key server.key -out server.csr -subj "/CN=localhost"
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
Replace 'localhost' with your domain name. Run commands one by one because openssl will prompt you same values for certificate generation
If you need a trusted certificate, request one to a trusted authority like letsencrypt.org