Focussing a telescope
Focussing a telescope is such an every-day event in an astronomer's live that we sometimes forget that it needs deliberate actions to put a star into focus. The most straight-forward method is minimizing the full width half maximum (FWHM) of the image of a point-source on your detector - but it is also most expensive in (observing) time and the least accurate one - subtle changes in the Earth's atmosphere might blur the image in turn spoiling your minimization process. An example of this procedure can be found here.
The most accurate results - and also obtained really fast - are provided by a focus pyramid. A small glass pyramid is inserted into the beam, causing the image of a point-source to split up into four sub-images. The distance between the sub-images is a direct measure of the focus - thus only a single exposure is needed, once the distances have been calibrated. The drawback is also imminent: You need an additional peace of hardware that has to be brought into and retracted from your telescope's beam. See this page for details.
Another method has been outlined by A. Tokovinin and S. Heathcote (PASP 118, 1165; 2006) in a very enlightening paper on optical aberations . It needs no additional hardware and relies on calculating an image moment termed A4 on two, an extra-focal and an intra-focal image. Using a pre-determined calibration, the exact focal position can be read off from these two A4 measurements. This is a method I can full-heartedly recommend, see this page for details.