I dont know about gas industry, but perhaps this will shed some light.
In the drinking water industry the pig is a large foam block that is shoved in the pipe, and the weight of the fluid behind it drives it along. It is used to physically loosen the accumulated debris on the inside of the pipe. This debris concentrates behind the pig, and when the pig arrives at it's destination you remove the pig and allow the fluid (and debris) to discharge to waste for a period of time until the fluid runs clear.
Some advancements include "ice pigs" which is just crushed ice. The advantage of an ice pig is you can hook up to a fire hydrant and pump the ice in, no need to access the mainline pipe itself. An ice pig will also disintegrate on its own, no need to remove it, just allow it to flow out of a downstream hydrant, any ice left behind isn't a problem.