Surround yourself with encouraging people. Your social environment has a huge impact on your success, so make sure the people you talk to are encouraging you to stay fit. Ideally, you should have a few friends who are losing weight or have done so in the past. Note that friends who want to lose weight but have never done so may not be supportive- look for successful people who will bring you up with them.
In a way, moderate-intensity physical activity is that "magic pill" a lot of people are looking for, because the health benefits go beyond keeping your waistline trim: Not only can it reduce your risk of cancer, stroke, diabetes and heart attacks, but studies have shown that physical activity can significantly improve the moods of patients with major depressive disorders.