What exactly is the 'flinch' reaction?

Is there something evolutionary involved? I mean, we flinch when we get hurt, when we see someone get hurt (while knowing we aren't getting hurt the same way) and when we fumble or drop things. Where did this reaction come from?