Parallax method

Parallax method
Simply put, they measure a star's apparent movement against the background of more distant stars as Earth revolves around the sun.