Stapling means you put staples across the stomach so there is only small opening left for food to go through.
In gastric bypass you put staples (stitches) across the stomach so the stomach lumen is completely closed. Then you cut the small bowell about 40cm below duodenum. The proximal (upper) part of small bowel is closed with stitches. The distal (lower) part of small bowel is pulled up and connected to the upper part of stomach, just above the staples (stitches) placed across the stomach. So, when you eat, the food is going from the upper part of stomach directly to the lower part of small bowel avoiding the low part of stomach, duodenum, and upper part of small bowel.