The best way to prevent the craving is to minimize the amount, or eliminate them from your diet completely. It takes some willpower but your body can adjust if you allow it to :) Also, I suggest you drink a lot of water (water can be very filling) & distract yourself for like 10 minutes (the craving will usually go away). Perhaps brush your teeth when you want to eat that certain thing you are craving, or consider taking a walk or a run instead. These cravings might also be your body's way of saying that it needs a certain nutrient that it's missing, so try taking a look at your overall diet and see if its lacking in any vitamins, etc.
That entirely depends on what you're craving. In most cases, preventing them entirely isn't very likely. You could, however, distract yourself until the craving passes with things that keep you busy otherwise.
If you give me some information on what you're craving, I could give you some distractions you could try. ^^
if the thing you are craving is something you can get in a yogurt then eat the yogurt :)