The mind/body enters an interesting mode in my experience, where I become disassociated from the situation and can focus on what needs to be done. The pain strangely suppresses temporarily, until a sense of completion/achieving stability is restored.
Living things are inherently survival machines.