There are several ways you may reduce the chance of getting Measles:
Isolation- Patients with measles are normally infectious from 3 days before the rash up to 4-6 days after its onset. Thus exposure of patients during this period should be limited.
Vaccination- A live attenuated measles vaccine is available as a monovalent preparation or combined with rubella virus as MMR vaccine. It should be administered at 9-12 months followed by a 2nd dose at 4-6 years of age. If someone has been in close contact with measles, and was unimmunized then they should get immunised within 72 hours of their contact, post which they can resume to school or daily work.