Cash on balance sheet: The acquiror can buy the target with existing cash it has on its balance sheet. There is no need to access capital markets for financing, so the only cost is the opportunity cost of the cash which is the lost interest income the company would have earned had they kept the cash in the bank account.
Debt: The acquiror can finance the acquisition by borrowing debt. The cost of the debt is the after-tax interest expense. Interest expense is tax deductible and has a tax shield. Also, debt holders have higher priority on assets in case of a bankruptcy, so they have less risk than equity.
Stock: The acquiror can finance the acquisition by issuing new shares or offering a share exchange. Creating new shares will dilute earnings per share as net income will be divided by a larger number of shares. Equity is the most expensive because equity holders take on the most risk with the lowest claim on assets in case of a bankruptcy, so they expect the highest return.