How a loan works