Measure the absorption spectra from a distant star. Stars emit light, which can be measured and diffracted to produce a color spectrum. However, they do not emit a complete spectrum of light, which has some dark lines across it. Some of the light is absorbed by gases in the star's atmosphere. A spectrum with lines across it is an absorption spectrum rather than an emission spectrum.
Compare the absorption spectra that you would expect with the ones that you have measured. The composition of stars is known. The differences between the expected and actual spectra arises from the Doppler shift, or the way that the frequency of waves, including electromagnetic waves, change according to the relative velocity of the source and the receptor of the wave. If bodies are traveling toward each other, wavelengths will be shorter, and the opposite is true of bodies moving away from each other. This effect is demonstrated by the fact that when a police car passes you, the pitch of its siren seems to drop.
Calculate the relative velocity of the star. This can be done with the following equation:
dL/L=v/c, where dL is the change in wavelength, L is the wavelength, v is relative velocity and c is the speed of light, 3.00x10^8 ms^-1.
Repeat this process for various stars, until you start to have a map of your solar system and the surrounding stars in other galaxies and your own. You will be able to map the position and velocity of these bodies, and ascertain your own.