What is the difference between AUTO_INCREMENT, IDENTITY and a standalone sequence?
All three generate numbers for you, but they are three different mechanisms with different behaviours.
MySQL's AUTO_INCREMENT is a column attribute. The column is declared with it and the engine fills in the next value on insert. It is tied to the table, it cannot be shared between tables, and it has gaps — the counter advances even when a transaction is rolled back, because the value is allocated before the commit.
The SQL standard's IDENTITY, also called GENERATED ALWAYS AS IDENTITY or GENERATED BY DEFAULT AS IDENTITY, is the portable version of the same idea. GENERATED ALWAYS means you may not supply the value yourself; BY DEFAULT means you may, and the identity only fills in when you do not. SQLite has supported it since version 3.31, PostgreSQL since 10, and SQL Server calls it IDENTITY and uses the BY DEFAULT behaviour.
A standalone sequence is an independent database object. You create it once and draw values from it with nextval, and you can share one sequence across several tables, use it to generate something that is not a primary key, or hand out values without touching a table at all. PostgreSQL has sequences natively and also supports the standard's IDENTITY as a wrapper around one; Oracle has sequences and identity columns; MySQL 8 has sequences; SQLite does not have them and has to use AUTOINCREMENT or an application-generated value.
The gap behaviour is worth knowing because it surprises people. With AUTO_INCREMENT and IDENTITY, the counter is not rolled back, so a failed transaction leaves a hole in the sequence. That is deliberate — it avoids two transactions being handed the same value after a rollback — and it means ids are not contiguous. If you need gapless numbering, a sequence gives you more control, at the cost of handling the concurrency yourself.