** Proper nutrition and eating habits are most important. Without that, all the exercise the world won't matter. If you want to lose fat, you need to keep a moderate calorie deficit. Also, make sure your overall diet is clean and well rounded. Fruits, vegetables, whole grains, protein, and healthy fats.
In terms of cardio vs weights, I would recommend doing BOTH.
Lifting weights combined with proper nutrition will help to change your body composition resulting in a loss of fat and a slimmer, firmer, physique. The type of weight training you do however, does matter. Stay away from machines, and stick to free weights. Do compound exercises that work multiple muscle groups and avoid isolation exercises. Compound exercises would be - squat, deadlift, lunges, step-ups, bench press, military press, weight assisted pull-ups, weight assisted dips, barbel rows, etc..I would recommend lifting weights 3x per week every other day (ex - Mon/Wed/Fri)
** Use a weight that actually challenges you. If you can do more than 10 reps total, you aren't going heavy enough. Women tend to have an irrational fear of lifting heavy because they think it will make them bulky. However, since women have low levels of testosterone, they can't bulk up from lifting. Just make sure that you use proper form. That is what's most important. If you don't have a lot of experience using free weights, I would recommend working with a trainer on a short term basis who is well versed in free weights.
Cardiovascular exercise will keep your heart and lungs healthy which is equally important. Make sure to do it AFTER your lifting. Finally, once you have been doing regular cardio for a few months, start working interval training and eventually high intensity interval training AKA HIIT into your cardio program a few times per week. This will help further your fat loss efforts.