Memory is a complex function that involves multiple steps, starting with the input of the stimulus to the brain and ending with independent memory retrieval.
These are the part of brain which are responsible for memory
1.Hippocampus (Long-term memories)
2.Prefrontal Cortex (Short term memories)
3.Cerebral Cortex