A web application builds a database query out of text, and if it glues your input directly into that query, your input can change what the query means. SQL injection is exactly that: instead of treating your input as a value to look up, the database treats part of it as SQL to execute. That single mistake can leak the entire database.
It usually shows up in login forms, search boxes, and any parameter that feeds a lookup. The two classic outcomes are authentication bypass, where you trick the login into always being true, and data extraction, where you use a UNION query to append the database contents to the app's normal results. Both come from the same root cause: untrusted input landing in a query unparameterised.