If you are looking to lose weight, remember the trifecta of fitness: diet, sleep, and exercise. Think of it like a stool; you cannot support a person on a stool that has only two legs. What this means is that you have to have 8 hours of sleep per day, exercise regularly (2-4 times per week with rest days in between depending on your capabilities), and diet.
Diet accounts for 85%+ of weight loss. Exercise certainly helps and makes you look better once you've lost that weight, but diet is everything. The best way to lose weight, especially if you are already overweight and are inexperienced in the gym is diet. If you don't diet, you have to burn more calories. Because you are overweight and haven't used the gym before to build muscle, you need to work much harder to burn the same amount of calories as a regular gym-goer because muscles allow you to burn calories better through more vigorous exercise and because they demand calories for their upkeep.
So, in summation, what does this mean for you? Go on a diet that has fats, carbs, and proteins but cuts down on sugars (doesn't have to be zero, just lower). EDIT: Forgot to mention that this diet should lower your caloric intake. Start gradual and slow. First grow accustomed to eating the right foods in the quantity you feel you need. Then start spacing out your meals. Then start lowering the caloric intake gradually. End edit.
One easy way to do this is to replace all hydration with water and unsweetened teas and the like. Try to accustom yourself to multiple small meals per day rather than 1-2 big ones and snacking. As far as the gym, I find "Starting Strength" 5x5 by rippetoe to be a great starting point because it is very flexible to your starting capacity. If you don't have gym access, then calisthenics can take the place of gym work but keep in mind you have to work for longer to achieve the same results. I have heard good things about HIIRT regimens for calisthenics but can't comment on those from personal experience.
Good luck and feel free to ask any other questions you may have÷