Stellar Distances

When you look up into the night sky, you can see thousands of stars shining.
But you can't say how far away they are. Any star seems to be as far as any
other and this led the ancient Greeks to believe that all the stars were the
same distance away, stuck on a huge crystal sphere surrounding the Earth.
Nowadays astronomers think differently, but how do they measure the
distances to the stars?