If the lines shift back and forth, it means that the star may be orbiting another star - the spectrum will give the information to estimate the mass and size of the star system and the companion star.