Well, according to studies, most food cravings only last about ten minutes. If you can keep yourself busy doing something else during this time period, like exercising, or trying your clothes on, the cravings may go away. On the other hand, if you've been severly restricting, you're probably actually hungry.
In that case I suggest you:
1. Drink a glass of water
if still hungry
2. Take a tsp of apple vinegar
(that's a real appetite suppressant)
and if still hungry
3. Eat something with very few calories but takes a lot of room up in your stomach, like celery, carrots, lettuce or cabbage. Make sure to chew slowly.
4. And as a last resort, I often have a few almonds, which are calorie dense, but are very efficient at reducing appetite.
There may be better ways of not thinking about food, or reducing appetite, but those are my methods, and so far they've worked for me.