I have a lock, it knows it has a unique ID of 123.
I have a keypair A, the lock is programmed to trust messages signed by keypair A.
My friend has a keypair B. I encode a message in the block chain signed by A that says something equivalent to "lock 123, you may open for whoever controls public key B"
When either I or my friend come to the door and scan at the lock, we send it our public key. If the public key matches one that the lock has been told to trust, it sends back some random data. We sign that random data with private key A or B, thus proving that we actually own that keypair, and the lock opens.
If someone else sends a message to lock 123 that isn't signed in an appropriate way by some key the lock has been told to trust it ignores the encoded message. If someone sends it a public key that it doesn't trust, it ignores that too.
I need to give access to my wife, who holds keypair C. I send another message to the lock saying "allow access for keypair C but also make keypair C an administrator so she can grant access to others too"
All of this happens transparently in milliseconds with a simple application that could run on your smartphone.