Injection is a single idea — user data is treated as code by an interpreter. The interpreter changes (SQL engine, shell, browser), the bug pattern is identical.
The app builds SQL by string concatenation. A single quote in the input closes the literal — and the rest is parsed as SQL.
q = "SELECT id, username, ssn FROM users WHERE username = '" + name + "'" cursor.execute(q)
Enter alice — one row returned.
Enter ' OR '1'='1' --. The quote closes the literal,
OR '1'='1' is always true, -- comments the rest.