Three basic patterns of ownership for airframes.
1. Your airline owns it, free and clear, paid off. Cost of flying it is therefore less. It could be then available for use as collateral for any loan your airline needs: Operating cash, other capital improvements which are not their own collateral, etc. If you do this, that lender could be a major airline, bank, venture capital firm, Uncle Guido, etc.
2. You lease it from its owner, who could be a major, could be an airframe leasing company, Leasing subsidiary of Boeing, Airbus, or other mfgr, bank (commercial, private, Ex-Im), etc. Just like a car lease, various agreement language about residual value, cost to own at end of lease, etc. Your cost of operating it includes your payments on the lease.
3. Your airline buys it, owns it, but has a loan to make payments on. Cost of debt service on the loan is part of the cost of operating it. Likewise, loan could come from anybody with a large enough checkbook.
Those contracts are long legal documents, with lots of whereases and wherefores and complications. Lawyers bill by the hour writing this tonnage.