It's true that a diet high in fat can lead to weight gain. But it takes more than just eating low-fat foods to lose weight. You must also watch how many calories you eat.
Remember, your body stores extra calories as fat, even if they come from fat-free, trans fat-free, and low-fat foods. If you replace high-fat foods with high-calorie foods, like sweets, you'll likely gain weight rather than lose weight.
To lose weight, you need to burn more calories than you eat. You can do that by exercising more and by eating less fat and fewer calories.