While the vast majority of students have a completely safe experience abroad, just like at home, emergencies like natural disasters, terrorist attacks, crime, health crises, and others can occur. Researching your resources in case of an emergency is an important way to be prepared. Fill out a Personal Emergency Action Plan before you go abroad, which details important contact information of emergency services and resources. You should bring this with you in paper or digital form so you they can refer to it while abroad. It is important to keep your program, university, embassy, and other emergency contacts on you at all times. Many programs will give you a card with this information, but you should also put them in your phone.
If you are a US citizen, you should also register with STEP, the US State Department's Smart Traveler Enrollment Program, so that the State Department can contact you in case of an emergency and provide you with information and relevant services. If you are not a US citizen, research your native country's services to their citizens in an emergency abroad. They may have a similar registry program.