The ability to defocus your eyes on command is a natural one, but not everyone can do it. It's accomplished by having the ability to relax the ciliary muscles in your eyes, which causes them to lose their focusing powers https://www.healthline.com/health/eye-health/can-everyone-unfocus-their-eyes
Some people can voluntarily control their eye focus, making their vision blurry or unfocused.