How does coughing reveal a hernia?

Increased Pressure. Coughing causes an increase in the pressure inside of your abdomen. This causes your hernia to protrude and bulge out.
Increases pressure. Coughing will increase intra-abdominal pressure, and thus push intra-abdominal contents through the hernia defect. This is seen and felt as a bulge under the skin that is bigger with coughing. Hope this helps!