Postgres tables store data in the "heap" method by default, with each file split into 8Kb pages. When a row is updated, a new version is written and the old one remains until the transaction is completed. The vacuum process cleans up old versions of rows, freeing space on pages and updating maps to reflect available free space. Autovacuum runs automatically or can be manually run to clean tables and prevent bloat. Parameters such as autovacuum_vacuum_threshold and autovacuum_max_workers control when and how often autovacuum runs, while autovacuum_work_mem affects the time it takes for autovacuum to complete. Long open transactions, stuck locks, insufficient resources, and space not freed on a filesystem level can cause autovacuum problems and bloat.