There are several procedures that comprise the field of bariatric surgery. All function by limiting the amount of food you can normally ingest through reducing the size of your stomach, restructuring it permanently or temporarily, or by adding medical devices in order to make it full faster.
Whatever you may choose, it is not a cheat code for making you thinner, as recovery from the procedure and your new diet can be real challenges. However, it will act as a major boost for changing your lifestyle for the better.