Dissociation is a break in the normal connection between perception, memory, identity and self-awareness. In mild forms nearly everyone experiences it: you drive thirty kilometres and can't recall the road, you read a page and retain nothing.
In stress- or trauma-related forms it shows up as depersonalisation — the sense of watching yourself from outside, as though watching a film of yourself — or derealisation, the sense that the world around you is unreal, flat, like stage scenery.
Its function is protective. When an experience is too overwhelming to process in real time, the mind lowers the intensity by disconnecting. The problem arises when the mechanism stays on after the danger has passed, or fires at ordinary stress.