I understand how telescope, microscope and glasses work.
But how do contact lenses work?
[Physics] How do contact lenses work
everyday-lifegeometric-opticslensesopticsvision
Related Solutions
This is a real effect, but it doesn't have anything to do with coma or any of the optical aberrations. It is caused by the fact that the effective focal length shortens as you tilt a lens. When your eyesight gets worse, you need a stronger focal length lens in your eyeglasses, and tilting the lenses has this effect. The problem with doing this all of the time is that it introduces distortions such as the coma you've pointed out in your question.
This presentation and this journal paper show the the effective focal length of a tilted lens from ray tracing simulations and from theory respectively. From the paper, the focal length for the tangential focal point (up and down as you look through your glasses) and the sagittal focal point (left and right as you look forward) are given from the paper by
$$
\begin{align}
f_{tan}&=f_0\frac{n-1}{n}\frac{\cos\theta\sqrt{n^2-\sin^2\theta}}
{\sqrt{n^2-\sin^2\theta}-\cos\theta}\\
f_{sag}&=f_0(n-1)\frac{1}{\sqrt{n^2-\sin^2\theta}-\cos\theta}
\end{align}
$$
where $n$ is the index of refraction of the material and $f_0$ is the original focal length. I've plotted $f/f_0$ for both of these in the figure below for an index of refraction of 1.5. I believe that this is special to a lens which has equal radii of curvature on both sides (bi-convex or bi-concave), but the results for other types of lenses will have similar outcomes.
These are all good questions
So, I'm guessing, the resultant focal length of the system (whatever that is), will also depend upon the distance between the lenses. How does the power of the lens fit into all this?
That is correct. In the limit where your lenses are thin the powers of two lenses is added as follows: $$\phi_\text{tot} = \phi_1 + \phi_2 - \phi_1\phi_2\tau$$ where the individual powers are given by $\phi_1 = 1/f_1,\phi_2 = 1/f_2$, and $\tau = t/n$. $t$ is the spacing between the two lens elements and $n$ is the index of refraction of the medium between your two lenses ($n=1$ in vacuum). The effective focal length is then $f_\text{effective} = 1/\phi_\text{tot}$
There is a distinction between the effective focal length $f_\text{effective}$, the rear focal length $f_\text{R}$, and the front focal length $f_\text{F}$.
$$f_\text{R} = n_\text{R}f_\text{effective}\quad \quad f_\text{Front} = -n_\text{Front}f_\text{effective}$$ I.e. the front focal length is measured from the front principal plane to the front focal point (negative distance for a positive effective focal length) and the rear focal length is measured from the rear principal plane to the rear focal point (positive distance for a positive effective focal length).
Also, what do they mean by the 'resultant power of the lenses' in the first place? The resultant system of lenses is not going to be like these lenses which have negligible thickness. Where are you going to measure the focal length from?
This is a very important point. For a system of multiple lenses you measure the front and rear focal lengths from what are called the front and rear principal planes (rather than measuring directly from a lens element). For the case of a single lens the front and rear principal planes are located at the lens. For two lenses, the front principal plane is shifted from the first lens element a distance
$$d_\text{F} = + \frac{\phi_1}{\phi_\text{tot}} \frac{n_\text{F}\;t}{n}$$
the rear principal plane is shifted from the second lens element a distance.
$$d_\text{R} = -\frac{\phi_1}{\phi_\text{tot}}\frac{n_\text{R}\;t}{n}$$
For the above two equations I am defining the first lens to be on the left and the second lens on the right. The separation is $t$ and the index of the medium between the two lenses is $n$. The index of the medium to the right of the two lenses is $n_\text{R}$ and the index of the medium to the left of the two lenses is $n_\text{F}$. A value of $d_\text{F}$ or $d_\text{R}$ less than zero indicates a shift of the respective principal plane to the left; a value greater than zero indicates a shift to the right.
Disclaimer: this response is only a very brief introduction to the ideas of gaussian optics and the cardinal points. This stuff can be really confusing for anybody, especially when you consider all of the sign conventions. Also, these equations are really only valid in the paraxial limit for rotationally symmetric systems. Having said that, these basic formulations can be expanded to a system of any number of lenses -- not just 2. If you really want to understand this stuff there are surely some good books on this material. Hecht seems to be the book for intro optics, although I haven't read him. Check the table of contents to make sure gaussian optics is covered (it should be) because that's quite an expensive text.
Best Answer
Your question is really "how does the human eye work?", since the contact lens is designed to adjust the optics of the human eye.
This image from the wikipedia article on the anatomical lens shows how the cornea and lens focuses incoming light from the left onto the retina (right).
Previously, I'd written that the biological lens in the eye was responsible for the optics; however, as pointed out in the comment of David White below, the cornea actually performs most of the focusing; according to wikipedia, it contributes about 2/3 of the focusing power. Most of the rest is due to the lens, which also performs an important role in the process of accomodation, which is how we change our focus between objects at different distances.
For people who are nearsighted or farsighted, the light coming into the eye does not end up in focus. See this picture for the case of nearsightedness:
You should imagine the contact lens being placed over the cornea (left surface) and causing the rays to adjust so that the image ends up in focus.