The common measure of distance to the stars is the light-year. Although it contains the word year, a light-year refers to a distance. It is the distance that a beam of light would travel in one year at 186,300 miles per SECOND. This comes out to 5880 billion miles or 9463 billion km. Light takes about 8 minutes to get to us from the sun. It is a little over 1 light second to the moon.
A common method to find the distance to nearby stars is to use parallax. (this is the most direct measurement). Hold a finger up in front of you at arm’s length. Look at it with just the right eye, then just the left in quick succession. You will see the finger appear to move back and forth in front of things further back. This is the basic idea behind parallax.
For stars, the right eye and left eye correspond to observing stars 6 months apart, when the earth is at opposite sides of its orbit. Stars that are close enough will appear to move slightly compared to the distant stars. This motion is measured in fractions of a degree called arc-seconds. From this, and the distance between the 2 positions of the earth (essentially the diameter of its orbit), the distance to the star can be calculated using simple trigonometry.