VACUUM removes dead tuples left by MVCC, updates visibility maps and statistics, and helps prevent table bloat and transaction ID wraparound. Autovacuum runs this automatically in the background so the database stays healthy.