Keys are earned every time you level up.
Keys can be used to expand your sanctuary to new areas.
When there is a gold padlock at the edges of your screen drag a key over to it to unlock it.
Keys can also be used to unlock new sets of fish from chests.
Keys which are unused will be stored in your inventory.