Measles is caused by a virus. It is spread when an infected person coughs, sneezes, or shares food or drinks. The measles virus can travel through the air. This means that you can get measles if you are near someone who has the virus even if that person doesn't cough or sneeze directly on you.