Translation memory works by breaking down text into segments, which are then stored in the database along with their corresponding translations. When a new email is being prepared, the TM system scans for any matching segments from the database, offering suggestions to translators and saving time by avoiding retranslation of identical or similar content.