To afford means you have enough money or time for something. If you only have ten dollars on you, you can't afford to buy a twenty dollar hat.
Afford is a verb that has to do with means. You either have a surplus and therefore can afford something, or else you have a deficit and can’t. It can be in the monetary sense: "$100 for cashmere socks? I can’t afford that!” It can also refer to time: “Since my train wasn't scheduled leave for another hour, I could afford to wait for my sister ten more minutes.” Or even access: “The castle walls afforded a wonderful view of the moat.”