Stars typically DO travel with very high speeds relative to us. This moves their spectral lines either in to the red (if they are moving AWAY) or to the blue (if they are moving towards us). Using the Doppler Effect, we can very accurately determine the precise velocity of a star.
The first step requires identifying the lines at their ``rest'' wavelength:
The lines we expect from, say Hydrogen, will NOT be in their normal place if the star is moving quickly. However, ALL the lines move with the same relative shift:
If we can identify a specific relative pattern, like in this example, we see two close lines, separated by a third isolated line, this allows us to identify WHICH lines we are seeing.
By measuring the exact wavelength the lines are seen at, and comparing that with what we know the rest wavelength (stationary wavelength) is, we determine the relative velocity of a star.