Python's garbage collector operates in three generations (0, 1, 2), where new objects start in generation 0. `gc.set_threshold(t0, t1, t2)` controls collection frequency for each: `t0` for generation 0, `t1` for generation 1, and `t2` for generation 2, with `t0` triggering most often for new object allocations/deallocations.