Most certificates are used for public websites. These websites are commonly reachable via both www.domainname.com as well as just domainname.com.
A certificate will only include a single hostname, the value that you insert into the common name of the CSR. This means that a certificate ordered for domainname.com will normally not work for www.domainname.com.
BUT the certificate authorities have implemented a method to make sure that you do not need a multi-domain certificate or multiple certificates for a single website!
It does not matter if you insert the common name with www or without www, both versions will be included in the certificate.
After the certificate has been delivered the certificate authorities will automatically include domainname.com or www.domainname.com as an additional name in the certificate.*
*Please be advised that if chosen hostname already contains a subdomain (for example www.domain.domainname.com, or domain.domainname.com) the issued certificate will only protect a single hostname, i.e. www.domain.domainname.com or domain.domainname.com.
* this is only valid for single domain certificates. This is not the case for multidomein certificates. If you request a multidomein ssl, you need to include both www and non-www domains in the list of domains.