There aren't necessarily any foods or diets that will magically make you lose or gain weight. At the end of the day, weight loss is all about how many calories you consume. Your body needs a certain amount of calories, and if you consume more or less than it needs, that will result in weight gain or less, respectively.
If you are restricting calorie intake with the goal of weight loss, you should focus on healthy foods that are nutrient dense and lower in calories. These are foods like whole fruits and vegetables, lean protein sources (lean meats, protein powder, tofu, seafood, eggs, beans), low fat or fat free dairy products, and whole grains such as brown rice, whole wheat bread/pasta, whole grain cereal, popcorn, etc.). These foods are all going to give you nutrients to keep you full and supply your body what it needs, while avoiding extra calories.
There are other foods that are still healthy, but have greater caloric density. Foods high in healthy fats like peanut butter, nuts, seeds, avocados, and plant oils should be included as long as you're careful about the portion sizes. You can eat a very healthy diet and still consume too many calories, so portion control is very important.
Again, there aren't really any specific foods we would recommend you completely avoid. In general, however, unhealthy foods are high in added sugars, saturated fats, salt. Oftentimes, they are processed or packaged. You can still eat these foods because you don't want to burn out on a super restrictive diet. As always, however, consume in moderation.