What makes up a company's capital structure

what is the purpose of determining the weighted average cost of capital for a company