what is contained in a public key certificate Public key certificate is a digitally signed document which verifies the sender is indeed the person. May I know how can the receiver tell the sender is indeed the person solely based on information on the public key certificate? What are contained in the certificate? Does a public key certificate contain the same information as in any certificate?
You actually don't trust the certificate by itself. A certificate is like a diploma that a company (or a domain, e.g. www.crypto.com) obtained from some trusted party, called CA, or Certificate Authority. This diploma states that www.crypto.com is allowed to communicate with you using the public key written in the diploma. 

But, as you mentioned, www.crypto.com could generate that diploma to itself, then why should you believe them that the public key written in that diploma is realy theirs and not belongs to some man-in-the-middle attacker?

Here comes the signature part in the diploma. The CA attaches to that diploma a digital signature on www.crypto.com's public key, and you, as their client, verify that indeed, the signature is valid (you do so by applying the CA's verification key on the signature). By definition, nobody can forge that signature and trick you, i.e. to make a valid CA's signature on a fake www.crypto.com's public key.

A crucial key point here is that there exists a 'chain of trust', i.e. you'll believe www.crypto.com only if some CA that you trust tells you to believe it. By default, every browser (and operating systems) is bundled with a list of trusted CAs.