The key idea is that your passwords are stored in an encrypted file (database). This file can only be decrypted with the correct master password. This way, only people who know the master password can access the stored passwords.
The master password is not stored anywhere. There are no backdoors or cheat codes, so if the master password is lost or forgotten, there is no way to restore it. You may want to write your master password on a piece of paper and keep it in a safe just in case.