Take in less calories than you put out. It is not rocket science. Though many think it is. Or to make it even simpler. Use up more calories than you take in.
This works until it doesn't work. The body is very adaptable so if you cut your calories eventually you will stop losing weight because the body adapts and slows the metabolism to make up for the loss of calories. This is why reverse dieting works and people can continually take in more calories a little at a time and boost the metabolism so you can eat more and still lose weight.
Anyone looking to lose fat/weight should look into Reverse Dieting and The Ketogenic Diet. They are two different methods for weight loss and they both work but do it in different ways. You can also reverse diet while eating keto for a double whammy if you really need to lose a lot of weight.