Egypt is a very safe place to travel, but as with traveling in any foreign country, be alert, stay in groups if possible, and don’t flash huge wads of money around.  In crowded areas, protect your belongings from possible pickpockets, especially in the most touristy spots.  These measures are more common sense than anything else.

As for visiting Egypt in particular, you can walk nearly anywhere you like at any hour and feel safe.  Once dressed in a way that does not show much skin, women will find that they will be mostly left alone.  If still approached in an unwanted way, just ask to be left alone in a firm way.  If this does not work, raise your voice and you will find that this usually will get any unwanted followers let you be.  You may find that learning a few words of the local language may help you in these sorts of circumstances.  Memorizing a few dozen words before leaving for your trip might be a worthwhile endeavor.  You can even learn a few vocabulary words on the plane ride over!

There are times when you might be asked to visit a particular shop (most likely because the person who is doing the insisting gets a cut of anything you buy at that shop), but this does not mean you are getting ripped off in any way.