The act of pressing ground coffee in an espresso portafilter into a flat, level, evenly compacted puck before locking the portafilter into the machine. Without tamping, the bed has air gaps and uneven density; pressurized water finds the path of least resistance, channels through, and extracts unevenly.
A standard tamp uses ~30 lb (~14 kg) of downward force from a stainless steel tamper sized to fit the portafilter basket. Modern technique de-emphasizes the exact force number — what matters is level (the puck horizontal) and consistent (the same press shot to shot).
What tamping doesn't do
Tamping does not "compress the coffee to make it stronger." Pressure during the actual shot is what extracts compounds; tamping just gives that pressure a uniform bed to push through. Tamping harder doesn't make a stronger shot; it just slows the flow rate, which is a coarser version of grinding finer.
Common pitfalls
Uneven tamp (tilted): water races down the deeper side, channels, under-extracts the rest. The fix: distribute the grounds level (with a leveler tool or a quick swirl) before tamping, then tamp straight down.
Over-tamping (>40 lb / 18 kg): can compact some baskets to the point of compromising flow uniformity. Most modern advice is "press until firm, no need to lean on it."
Inconsistent force shot to shot: variable extraction. The fix: a calibrated tamper or a torque-limiting tamper that clicks at your target force. Many cafes use these now to remove the variable.
For pour-over the equivalent gesture is distribution + bloom: getting the bed even and saturated before the main pour begins. Same goal, different mechanics.