I've been trying to lose weight but I have been struggling.
You are referring to the reduction of total body mass? You should try the ketogenic diet!
I am not familiar with the ketogenic diet.  What is that?
The diet forces your body to burn fats rather than carbs, which lowers your body weight.
Does that diet require me to eat certain kinds of foods and avoid some foods?
Yes you would need to limit your carbohydrate consumption, mostly fats and adequate proteins.