This is caused by an elongated shape of the eye along the anterior-posterior axis. Images are focused in front of the retina instead of on the retina, resulting in near objects being in focus while more distant objects are blurry.
Myopia is the condition in which parallel light rays are focused in front of the retina of the eye, causing far objects to be blurry while near objects are seen more clearly. Compare hyperopia.