that is a question that many people ask themselves every day. Most people know what foods are bad for them and know when they are over-eating but can't stop. There are rare disorders (like Prader Willi Syndrome) where a person does not have the biological response to eating that makes them feel full (that's only one of the symptoms of Prader Willi) but for the rest of us, emotional eating is a great challenge.
Enjoying food is normal and good. We should all like and enjoy eating. But we need to stop using food as a kind of emotional crutch and find better and healthier outlets for our emotional needs. You can find this through an over eaters support group (Overeaters Anonymous) - you can find them at www.oa.org
You can take up exercise and meditation, including yoga. If you find power in prayer, use that too. You might want to make a journal of every thing you eat and how you are feeling before and as you eat - what is triggering bouts of overeating? If you write it down, you can learn what patterns you fall into and where to make changes.
You can also try individual counseling also.
On a practical level - stop buying junk. Only buy good, fresh and unprocessed foods. If you end up pigging out on apples, then that's not such a bad thing. Try and find a different route home, if you usually pass fast food joints and I know people write notes of encouragement and mantras in their cars or homes or workplaces. Repeat them in times of temptation and find strength in their words.
You are not alone. Many, many people face this and need support. Find a support group near you and tell the people in your life you need their support - ask them to offer you healthy foods without second helpings. Buddy up with someone who is also battling with emotional eating. Always eat a healthy, fiber filled breakfast which will start your day off well, revv up your metabolism and keep you fuller longer.
Set realistic goals and realize that these goals take time. We all fall off the wagon and that's ok. Just get up, dust yourself off, and try again. We learn as much from our failures as we do our successes.
Eat out less and prepare you own fresh foods at home. Brown bag your lunches. Exercise - start your body on a new regime, both physically and mentally. You CAN DO this and there is support out there to help you! And come here as often as you can - you'll find tons of support and encouragement from people who have walked in your shoes and found a way out.