A lockbox is a basically a padlock with a cavity inside where a key to access your home can be placed. Only someone with an electronic key or the combination can open the lockbox and access your key. Having a lockbox available at your house makes it easy for other real estate agents to show your home to their clients.
Without the lockbox, real estate agents representing buyers would have to set appointments to meet you or your real estate agent at the house so they could gain access and view the home. This would be inconvenient. Since almost every other house does have a lockbox available, if you do not allow one most agents will simply not show your property. You will miss out on lots of potential buyers.
The listing contract specifies whether a seller allows a lockbox or not. It is locked into place, usually on the front door and cannot be removed. Only other real estate agents can access the key that is located within the lockbox.