First, the surgeon makes a small stomach pouch by stapling part of the stomach together or by vertical banding. This limits how much food you can eat.
Next, the surgeon attaches a Y-shaped section of the small intestine to the pouch. That creates a bypass for food, so it skips part of your digestive system. As a result, you absorb fewer calories and nutrients.