What is the best workout to lose weight? How many days/minutes a week?

I want to lose weight as well as get into shape. I am working out at the YMCA. Specfically if I could get some ideas about that sort of equipment.