What makes it possible
Blockchain transactions are atomic: either everything in a transaction succeeds or all of it is undone. A flash loan uses this. A smart contract lends a sum, the borrower uses it for a series of actions and the transaction must end with the loan repaid, usually plus a small fee. If repayment fails, the entire transaction reverts as if nothing had happened. Because of that, the lender takes no risk, and no collateral is needed.
Legitimate uses
Flash loans can fund arbitrage across exchanges without the trader owning the capital, let borrowers swap the collateral on a loan in one step or help refinance a position into a cheaper protocol. They open up large-scale strategies to small participants, who pay only the fee and gas.
Why they feature in attacks
The same property gives attackers temporary access to enormous funds. Encyclopedic accounts note that exploits of DeFi platforms have used flash loans to manipulate cryptocurrency spot prices. An attacker borrows a huge amount, distorts the price in a thin pool that a protocol relies on as its price source, profits from that protocol's reaction and repays the loan, all in one transaction.
What this means for users and builders
A flash loan is a tool that is neither good nor bad. The lesson is that protocols must not depend on a single easily moved price, and should use robust oracles and checks. As a user, it explains why some DeFi hacks happen without an attacker owning any funds. Check whether a protocol you use has been audited and how its prices are sourced, and keep exposure modest.