Step 1: Understand your cravings.Often times, we crave sweets because our bodies are lacking in an important nutrient. Instead of reaching your paws into the candy bowl, try satiating your sweet tooth with a handful of raspberries, fresh fruit, or even a sweet potato. In a way, you will be retraining your taste buds.
Step 2: Walk it off.Sometimes eating sweets is just part of an existing habit. Let's say you crave chocolate every day around 4pm. Instead of gobbling down that chocolate truffle (like you always do), take a quick 10-minute walk. I can almost guarantee that you won't be craving that truffle when you get back. (And if you do, try Step 1 or Step 3 and then reevaluate.)
Step 3: Go for gum or brush your teeth.Since chewing gum can reduce food cravings, it makes sense that it can also help stave off sugary cravings. Try chewing sugar-free gum. Also, peppermint tends to deter cravings as well, so if you're at home, try brushing your teeth.
Step 4: Give in sometimes.It's okay to indulge here and there, but in moderation. Be smart about how much you treat yourself to. If you are craving a cookie, have a mini one; if you want ice cream, have a child-size frozen yogurt with fruit instead of your usual chocolate chips.
Step 5: Go cold turkey (and tell people).If all else fails, cut out sugar all together. Some of us are all-or-nothing type of people. And for a select few, cutting sugar entirely may be the best route (although the first 48 to 72 hours will be very tough—trust me). Additionally if you tell people that you are quitting sugar for a while, they will hold you accountable. Plus you will be less likely to break your commitment when you have people watching you and encouraging you.
I hope you found these tips helpful! Another thing you do when your craving candy or sweets is to have a big cup of warm green tea with a little honey. For some reason, green tea reminds you of being healthy (so you don't want to eat brownies) and the honey quenches your craving for something sweet.