How do I extract information from an SSL key and certificate?

An SSL certificate contains the information about issuer, valid dates, subject, and other cryptic information. The openssl x509 subcommand can be used to retrieve that information from an SSL certificate.