A public key is a piece of data that you share with everyone, which identifies the access being granted, while the private key is secret data that grants access to the resources protected by the public key. They are always generated in pairs, that's why you'll sometimes hear them called keypairs when referring to both of them. Think of the public key as a door lock or car lock and the private key being the "key" that unlocks it.
I didn't really get this illustration at first, getting to see it as a door look as, public keys are transparent and as such though unaccessible, it's content is visualizable meanwhile, most doors are designed to be opaque but then,I came to the realization that, there are actually transparent glass doors that comes with locks and a key. So, it's a very correct illustration.
Why are public and private keys necessary
Suppose you paid for access to a computing resource. The vendor needs a way to securely provide you the login information to your resource. A lot of them use passwords for this task but the disadvantage of using passwords is that anyone who remembers what your password is can access your resource. There also exist brute-forcing programs for passwords.
These problems are partially mitigated by providing you a private key. First of all, private keys are not human-readable, so someone can't just glance behind your shoulder and remember them. Second, private keys take exponentially more time to brute-force than a medium-length password (you need a password length of about 311 ASCII characters to provide the equivalent security of an RSA-2048 private key, and 622 characters for RSA-4096 key).
311, that's a lot of numbers but still, I don't think the length actually makes for a better distinguishing factor as one can choose to combine numbers in ways hat could be unique to them to make out a lengthy password and that still doesn't make it a private key. I think the difference is more about it's generation as one follows a definite pattern when it's human because, there could only be about a point humans follow as to generating a combination set for easy remembrance which won't be random enough but the machine generated keys uses an algorithm set and is very much random.
It's a nice piece and I like the way it gradually moved along the parts of complexity. Still trying to grasp some information contained in the content though but, sure would be watching out for info's as these.