Everything will make more sense if you read Mastering the Lightning Network. You can read it for free on GitHub. https://github.com/lnbook/lnbook