Holochain garbage collection

Hi ,am just learning the holochain concepts by using chatgpt but came across the topic of garbage collection.So my question if original entry is not removed from the chain how it frees up the space and what is the purpose of tombstone entry.