How can I lose weight? Diets, pills, or exercise?

I need to lose probably around 40 lbs. I'm 5'10" and around 190 lbs. I used to be fit but I've really let myself go these past couple of years and been drinking too much beer apparently. So I'm open to suggestions on how to lose this extra weight.
How can I lose weight? Diets, pills, or exercise?
Post Opinion