The WACC is merely the average cost associated to the financing of debt and equity which were taken by a company to finance its assets and operations. To calculate the WACC, one must weight the cost of each borrowed dollar as a proportion of the overall leverage taken by factoring in interest rates and capital structure. For example, the costs associated to debt are going to be different that the costs associated with acquiring equity.
Let's cover some of the key components in the formula above. Essentially we are calculating a weighted average cost of funds by adding together the costs associated with equity and debt issuances. The components in the capital structure will include short term and long term financing. Common shares and preferred stock are common forms of equity issuances while corporate bonds, convertible bonds, commerical paper, notes payable, and other current liabilities represent debt issuances.
In the formula above, we are are weighting each component in the capital structure by the overall proportion of that instrument to the entire equity or debt buckets. Notice, we have split debt and equity due to the tax implications associated with the debt portion of the capital structure. There are various tax benefits associated to this bucket and for this reason many corporations prefer to issue debt rather than equity.
Calculating the "cost of debt" is typically a much simpler process than calculating the "cost of equity". Typically, debt instruments will be priced at or issued to the market at a spread to a benchmark such as libor or US treasury bond. This spread will be displayed in basis points. The "cost of equity", on the other hand, may involve using pricing models such as CAPM or Discounted Cash Flow (DCF) and require a little more work.