It's called accommodation, your eyes have tons and tons of muscles in them, and when you blur your eyesight on command, you're relaxing the muscles in your eyes. As to why people find it soothing especially when you've got a headache.This is something every human can do. Just not everyone has done it on purpose or took any recognition to it. Hope I helped.