It's not necessarily psychology, it could be an involuntary stress response called freezing behaviour. It's where you stop, become hyper alert and observant of your surroundings to make a conscious decision about how to act. It's basically the conscious alternative to fight or flight.