Compaction in Apache Cassandra is the process of merging SSTables to reclaim disk space used by deleted or overwritten data. It occurs automatically in the background after memtables are flushed to disk or manually via nodetool. There are minor, major, and single-SSTable compactions. The compaction strategy, such as size-tiered, leveled, or date-tiered, determines how SSTables are merged.