Your safety and that of your companions and your gear is paramount, no one wants to get mugged or robbed. Most places I have visited are no less safe than parts of our big cities. Thieves and pickpockets are everywhere. If you’re going to see the changing of the guard at Buckingham Palace, be aware of light-fingered bystanders. Big cities in the height of tourist season require vigilance.
Your primary and best defence is situational awareness, be aware of everything that’s happening around you, particularly from behind.

Don’t let your handbag or camera hang loose at your side or on your chest, hold on to it with at least one hand like the young lady in the center of the picture above (it would be better is she had the strap across her body.) A favourite technique for thieves is to cut your camera or handbag strap and run. Get and use a slash-proof camera strap, PacSafe makes a good one that is very resistant to slashing. Using a Spider Holster in lock mode is another good deterrent.

If you’re wearing a backpack, move it to your chest when you’re in crowded areas.

Stopping to enjoy a street band is part of the enjoyment of travelling, just make sure that you don’t loose track of what’s going on around you.
Don’t hang your camera on a chair back while you eat, leave it in your lap. If you are at a buffet, take your camera with you when you load your plate. Don’t rely on someone else to guard your gear, their situational awareness may not be up to the task, especially if they are not used to packing gear.
As I said before, most places are safe. Don’t get paranoid about it, if you look scared, you become a target.