Your company has some capital. Maybe from you, investors or maybe from banks. How much does it all cost?
Cost of debt may be easy to get. It's the interest you pay on your bank loans. However, there are bonds that do not need to pay interest, they are just sold for a lower price than they will be redeemed.
Cost of equity is where it gets interesting. If you are at a stage of your company where you pay (yourself or your investors dividends), you might assume that's your cost of equity. But it's the required rate of return that matters. That means both dividends and value increase count.
Estimating required rate of return is tricky. One way is to check comparable companies, especially those that are traded on public markets. You can then increase your estimated cost by factoring in size and illiquidity.
Or you can estimate risk premium based on cost of debt. However you choose to determine your cost of capital, it is only an estimate. Each evaluator will have a slightly different view.
Here's where you can use your cost of capital: It's a preferable discount rate in NPV valuation of project, it can show your risk compared to other companies and ventures and you can use it to determine enterprise value.
Another use is in determining the best capital structure. Debt is cheaper, due to covenants, preferential treatment in bankruptcy and tax-efficiency. Equity on other hand is more flexible, as you can postpone dividends, risky and more expensive.