The most accurate, simplest answer: we really don’t know.
We have some ideas about which regions of the brain are important for certain behaviors/functions/memories. But in terms of what actually creates personality, individual preferences, consciousness, etc? No clue yet.
If you want to know how the brain generally stores information like memories: It creates new connections between neurons, basically creating an extremely complex circuit board of on/off switches. Personality is probably stored similarly somehow, but again we don’t really know the full mechanisms.
Latest Answers