There are two limiting cases of the general optical coherence function: spatial and temporal. Temporal coherence refers to the spectral width of the light, while spatial coherence is a measure of the size of the source. Temporal coherence is measured using (for example) a Michaelson interferometer, while spatial coherence can be measured using a Young double-slit interferometer.
Laser light, for example, has a very narrow spectrum (long temporal coherence), but the spatial coherence is low (speckle is visible). Starlight, by contrast, has a short coherence time (broad spectrum), but is highly spatially coherent. Just as temporal coherence can be increased by spectrally filtering the light, spatial coherence can be increased by spatially filtering the light (through a pinhole or single-mode fiber, for example).
Measuring the spectrum of a distant star is fairly easy since the spatial coherence is much larger than the entrance slit of a spectrometer.