Arm Pumping, also known as "shoulder pumping", can be used any time Samus is moving on foot. While moving on foot, the animation of Samus changing the position of her arm cannon will shift her forward one pixel. This includes angle up, angle down, and bringing the arm cannon forward (ex. firing a weapon).
Additionally, Samus bringing her arm cannon back to her side - or in the event the beam is being charged, back in front of her - will also count as an arm pump. This will be referred to as the "neutral position."
This technique is most commonly executed by spamming the shoulder buttons (R and L) as players almost always keep angle up and angle down mapped to those respective buttons.
Because this technique, when performed a single time, causes a one pixel shift directly forward, it can cause Samus to fall off of certain slopes when moving forward. If this occurs, her momentum will be reset once she lands, resulting in a loss of speed, so be careful about arm pumping when moving on such slopes.
An example of a room which contains slopes that Samus cannot fall off of from arm pumping is Speed Booster Hall. An example of a room which contains slopes that Samus can fall off of from arm pumping is Parlor.
While mashing as fast as possible will create the most arm pumps and give the most benefit, even a relaxed arm pump will speed up several rooms by a significant number of frames.
It is important to keep in mind the small amount of timesave relative to other aspects of the run -- it's best to avoid arm pumping if it has a chance of interfering with other controls. In this example, accidentally shooting a Super while holding Angle Up or Angle Down will likely result in bonking the door, and will cost much more time than arm pumping saved for that room.
Arm pumping is almost always more optimal than mockballs, but some runners will instead do mockballs in some sections of the run in order to reduce complexity, and to save their hands for later parts of the run. Especially for runners who only have one Angle button bound. This includes Dachora Room going into Big Pink, or Speed Booster Hall. It's also common to mockball across the top of West Ocean for Phantoon-first categories, especially because of the complex slopes in that area.
Here's an example showing how arm pumping can lose time if you do it on downward slopes that are too steep:
This is exaggerated for effect in this video, but even a single stumble will lose time for this room compared with no arm pumping.
The effect of arm pumping is proportionally greater when Samus' speed is lower. So pumping is more effective before picking up Speed Booster, and then even more effective when walking, such as when retaining a Blue Suit. For instance, if Samus is running at 5 pixels per frame, then it takes 5 armpumps to reach your destination 1 frame sooner. Meanwhile, while running at 9 pixels per frame it requires 9 armpumps to reach your destination 1 frame sooner.
Arm pumping in mid-air provides no benefit. Having both Angle buttons pressed at once while running makes Samus angle up, but if you're holding both Angle buttons when Samus lands, she will Stop on a Dime and aim up.
The reason holding angle down while mashing angle up is less efficient for humans than mashing both angle down and angle up while trying to space them appropriately is illustrated in the input strings below. R means "angle up", L means "angle down", and "s" means "nothing." The bold portions indicate on which frames an arm pump would take place. These examples assume the player can mash each shoulder button at an average rate of six per second.
An example of what arm pumping would look like when mashing angle up while holding angle down:
R L L L L L L L L L L L R L L L L L L L L L L L R L L L L L L L L L L L R L L L L L L L L L L L R L L L L L L L L L L L R L L L L L L L L L L L R
An example of what arm pumping would look like when mashing both angle buttons with decent spacing:
R s s s L s s s s s R s s s s s L s s s R s s s s s s L s s s s R s s s s s s L s s R s s s s s s L s s s s R s s s L
As indicated above, because of the effect the neutral position has, it is more efficient for humans to mash both shoulder buttons and try spacing them appropriately rather than mashing angle up while holding angle down. This provides no extra benefit over just mashing angle up.