SQL injection is a common web application vulnerability that allows attackers to inject malicious SQL statements into an application's database. It can allow data leakage, modification, denial of access, and complete host takeover. SQL injection occurs when user-supplied input is not properly sanitized before being used in SQL queries. Developers can prevent SQL injection by using prepared statements with parameterized queries, stored procedures, and properly escaping all user input. Web application firewalls and additional defenses like whitelist input validation can also help mitigate SQL injection risks.