An engram or memory engram is an impression made physically in neural tissue of the brain by any mental stimulus, thereby explaining the persistence of memory.
Shortly before 2268, Dr.Richard Daystrom developed multitronics – a method of constructing a computer that could think, and of impressing memory engrams upon its circuits. The result was the M-5 computer, developed with Daystrom's own engrams. As Daystrom was near a nervous breakdown at the time, the M-5 was (like its predecessors M-1 through M-4) "not entirely successful". While multitronics showed some promise, it was eventually superseded by isolinear circuitry. (TOS: "The Ultimate Computer")
A memory wipe is a medical procedure designed for the purpose of selectively eliminating memory engrams from the mind of an individual. (TNG: "Pen Pals")
The Banean punished murderers by forcing them to relive their victim's last moments every fourteen hours; this was done by inserting the memory engrams of the victim into their brain. (VOY: "Ex Post Facto")