How SSL Certificates Really Work
SSL stands for secure socket layer. The SSL certificate is used to create an encrypted connection between user/browser and the server. So, let’s start from very basic.
When you typein your browser, your browser sends this request to DNS server and DNS server resolved this hostname request into IP address and forward it to web server then web server sends a response directly t the browser.
Now the browser asks the web server for his identity then server sends a copy of SSL certificate with his public key then browser checks if either the certificate is issued by a trusted authority or it is a self sign certificate. (Like many times our web browser prompt a message about the untrusted connection and then we click on more details and add the exception that time we are giving the command to our web browser to trust this certificate.)
When the browser verifies that it is a trusted certificate then it encrypt the a session initiation messgae basically the session key via using the server public key and send it to the web server then server decrypt the message(session key) with his private key and send a digital acknowledgment to start a SSL connection.