It happened to me once, in a car accident. I would like to provide a different explanation, than has been provided elsewhere.

Time does not actually slow under these circumstances, however, our sense of perception does increase, giving a sense that time slows down. The only possible explanation, whether you believe it or not, is that our soul jumps in to help out. The soul, is pure conscious energy and functions at a far higher rate than our physical consciousness, thus giving a sense of time slowing down. Some times called the sub- conscious or super-conscious, it's what creates the dreams we have before waking up. Notice how you can have a dream that seems to last a long time, but occurs only in a few short seconds before we awake. It does exist, and it is the reason why we have those extra abilities, that the rest of the animal kingdom does not have. To Love, Create, Free will!!! And by the way, Creation and Evolution, are around us 24/7. Take the time to think about that. (Creation = Ideas). Someone has a better idea, that's evolution.