Cash Flow and Repaying Loans

How lenders work it out?