How can you tell an object is moving through space - through doppler shift.
By getting its doppler shift, you can say if the object is moving away from you (if you see the object with a more red) or coming closer to you (if you see the object with a more blue).
You can get the the speed of that object by calculating the wavelength of light. When an objects moves away from you, light waves are stretched, giving them a red color. And if an object moves closer to you, light waves are compressed giving the observer a blue color. Through that process you can know the direction and the speed of the object.