How can I lose weight while still eating junk food?

I still want to be able to eat chocolate, pizza, ice cream, and chips but i want to lose weight. How can i go about doing this?