The principles of electrodynamics say that no matter what, you will always observe light to be moving at the same speed 'c' relative to you. You measure your flashlight light to move at speed 'c'. The person who isn't moving relative to you also measures your flashlight speed to be 'c' even though you are moving away from him.
Albert Einstein had the same question you had and he ran the math and found that because you still see the photons (light) as moving at speed c on say a train with your flashlight, and someone on the ground standing still also saw the light coming out of your flashlight at the exact same speed 'c' then the way you both are measuring time is what differs. What is 1 second for you is not the same amount of time as 1 second for the person on the ground...
The rate that time is passing for you is different from that of the person who is stationary. The rate that time passes is different in such a way that you both measure the speed of light to be exactly the same value. This idea is tied into what we call Special Relativity. Specifically this is known as time dilation (
http://en.wikipedia.org/wiki/Time_dilation): Time slows down as you get faster. This has lots of interesting consequences that have been shown to be accurate in a number of experiments. A theoretical experiment that illustrates the point more dramatically than ones that have actually been carried out goes as follows: If you get in a rocket ship and go visit a far off world (traveling very close to the speed of light) then when you get back after say a 5 year mission (5 years on your watch), thousands of years will have passed on the earth. You'll be in the far future. The closer you move to the speed of light, the larger the time difference.
Mathematically if you were to reach the speed of light yourself then time would stop. The universe would pass away in an instant for you which is how we poor humans would try to make sense of an existence without time. Unfortunately actually reaching that speed would require an infinite amount of energy so the best we can do is to get really fast. Particle accelerators are a good place to see the effects of relativity in that they can get particles up to approximately 99.996% of the speed of light or maybe a little more. They get very close, but the energy required to go just a little bit faster exceeds all the energy you put in from it not moving. It becomes exponentially more difficult to accelerate things.