When you open Codebook you are required to enter your Master Password. This unlocks or opens Codebook and allows the software to read and write information to the encrypted database. Codebook only decrypts your data as it is needed. Conversely, when you lock Codebook, the connection to the database is closed and it can't be reopened with out re-entering your Master Password.
You have logged in and now you want to lock Codebook because you are done using it. You do this by Locking Codebook.
You may want to keep Codebook open for a little while, for instance if you are copying some data into or out of the app. To do this, you can set the Autolock timer. The timer starts when Codebook is inactive - when you come back to Codebook the timer is reset. It's off by default but it's easy to turn on: