Encoding is the process of converting an event into an engram or memory trace.  The encoding process takes the original event and current cognitive states and transforms that information into an episodic memory (i.e., the original engram).  For example,  if you witnessed an accident (the original event), the encoding process would take that information along with your cognitive state at the time of the accident (the cognitive environment) and produce an episodic memory (the original engram).