The type of exercise you do isn't important, it's the effort(intensity) to which you train. Pick & choose between:
-Low intensity cardio, which can be done on anything, i'd say it's easier to set a pace on the bike/cross-trainer/stepper. Your aim is just to keep your heart rate at around 60% of max for 30mins+. take a small amount of carbs before hand to make sure you're not entering a catabolic state.
-HIIT (High intensity interval training) which consists of short burts of high intensity/low intensity cardio. advantage over low intensity is that it can be done in a shorter amount of time, scienficially it's subjective if it's better than low intensity for fat loss.
As has been sai, outside of a gym just pick someone you enjoy which is aerobic, with an improved diet the weight will come off.
If you do cardio in the gym don't do it to too high an intensity for a prolonged period, sure you lose weight but you lose a large percentage of muscle as well as fat, which isn't desirable and in the end you could end up skinny-fat.