What are the transaction isolation levels, and which anomalies do they prevent?

What can go wrong when multiple transactions run at the same time? Which isolation levels does the SQL standard define, and which anomalies does each prevent? What are the default isolation levels in PostgreSQL and MySQL?

ExplainTransactions and locksMiddleBackendData Engineer