The certificate installed on the server and in your browser provides those keys. If you have the certificate required by the secure site, you can exchange data with the site that only you and the server will be able to read. Certificates also are used for authentication. If you are exchanging data with a secure site you will want to make sure the site is who they say they are. Before a CA will grant a certificate to a site, the CA will verify that the site is who it claims to be.
Most browsers have certificates from several of the larger CAs already installed.
For most of the secure websites you encounter you will not need to install a certificate. If you do encounter a site that uses a certificate not already installed in your browser, a dialog box will pop up notifying you that to make a secure connection you will need to install a certificate. Read this dialog box carefully. Check with the organization running the site to be sure you have the correct URL and that the site is a trustworthy site. Using any one of numerous products, someone on the same network as you could intercept and steal your unprotected password.