One cough or sneeze sends droplets in the air. And if the person has the Measles, the virus in those droplets can live up to two hours in the enclosed airspace.
The infected person is long gone, but the virus can be breathed in by you or it can live on a surface you touch. Measles is so contagious if one person has it, 90% of the people close to that person who are not immune will also be infected. Which is why the Measles outbreak in California is national news.
Nearly 300 students and staff at two major California universities are under quarantine -- 2 contagious students attended classes and went to the library. Nationwide, the government has counted nearly 700 Measles cases. the majority of them are in New York.
The CDC considers you protected from Measles if you have records showing you received two doses of the vaccine:
The first dose is given between 12 to 15 months
The second dose sometime between 4 to 6 years of age