An eye is an organ that detects light. Different kinds of light-sensitive organs are found in a variety of creatures. The simplest eyes do nothing but detect whether the surroundings are light or dark. More complex eyes are used to provide the sense of vision.
Compound eyes are found among the arthropods (insects and kin), and are composed of many simple facets which give a pixelated image (not multiple images as is often believed). Trilobites (now extinct) had a unique form of eye (usually compound) formed from crystals of calcite, incorporating a doublet structure that gave a good field of view despite the rigid lens.
In most vertebrates and some mollusks (such as octopuses) the eye works by projecting images onto a light-sensitive retina, where the light is detected and transmitted to the brain via the optic nerve. The eye is typically roughly spherical, filled with a transparent gel-like substance called the vitreous humour, with a focusing lens and often a muscle called the iris that controls how much light enters. Although they are quite similar in function and appearance once fully developed, vertebrate eyes grow outward from brain cells during embryonic development, while mollusk eyes grow inward from skin cells.
How a complex structure like the eye could have evolved is often said to be a difficult question for the theory of evolution, on the basis that intermediate forms of an eye would presumably have been of little use, and light-sensitive organs are present in a variety of different creatures without any clear evolutionary link. However, eyes in different levels various animals show adaption to their requirements (for example, birds of prey have much greater visual acuity than humans), and the different forms of eye in, for example, vertebrates and mollusks are often cited as examples of parallel evolution.
In order for light rays to be brought to a focus they must be refracted. The amount of refraction required depends on the distance of the object which is being viewed. A distant object will require less bending of light than a nearer one. Most of the refraction occurs at the cornea which has a fixed curvature. The remainder of the required refraction occurs at the lens. The lens can be pulled flatter or rounder by muscles, which adjust the power of the lens. As we age we lose this ability to adjust the focus. Such a condition is known as presbyopia. There are other refraction errors arising from the shape of the cornea and lens, and from the length of the eyeball. These include myopia, hyperopia, and astigmatism.
When a person stares at an object, the two eyeballs rotate sideways to point to the object, so that the object appears at the center of the image formed in each eye's retina. In order to look at a nearby object, the two eyeballs rotate towards each other so that their eyesight can converge on the object. This is generally referred to as cross-eyed viewing. To see a faraway object, the two eyeballs diverge to become almost parallel to each other. This is known as wall-eyed viewing, where the convergence angle is much smaller than that in a cross-eyed viewing.
Normally, focusing operations of the eyes are coupled to the convergence operations. That is, when looking at a nearby object, the brain automatically increases the refraction index of lenses to focus on the object. At the same time, the brain also rotates the two eyeballs towards each other so they converge on the object.