Europe offers a very good area-wide health system. In an emergency you can find doctors and hospitals everywhere. Often you have to pay the invoice in advance, but you will be refunded immediately by your own health insurance.
There are also many pharmacies. The prices of the standard drugs may vary from country to country - but not widely.
In general, Europe is a quite safe place. All the cities are quite similar: just avoid the dark corners and in the night rather go back home to the hostel in a group. It is probably about the same as in your home town.
When staying in a hostel, simply talk to other travellers if they want to join you in the evening to go out together.
The same applies to night trains: get into contact to the other travellers in your compartment to become a small group.
It is best to lock the compartment doors in night trains. When sleeping on a normal seat, fix your back pack or suitcase bellow your seat with a simple, small bicycle lock. By doing so, you can prevent it from being stolen easily.
Keep money and valuables close to your body.
In hostels you will usually find lockers for your valuables. It is receommended to use them.
Important: make sure that your health insurance is valid abroad.
We can not tell you any details, as all health insurances have different rules in every country. It is best to ask your health insurance.
If necessary you can buy an inexpensive extra travel insurance.