From Leopard Gecko Wiki
Impaction is a major health problem not only for leopard geckos, but for almost every reptile. The main cause of impaction is sand or other loose substrate (Gravel, walnut shell, quartz, ect.) that your gecko might ingest during feeding. The ingested substrate doesn't digest like the rest of the food in its stomach, and either forms a mass in the stomach, or passes into the intestines and creates a blockage. This blockage prevents the gecko from pooping, and the gecko will stop eating. The sick leopard gecko will grow weak, and eventually die if not treated.
Early signs of impaction are lethargy, failure to eat or poop and a bloated belly. A warm soak and a drop of olive oil or mineral oil may help the gecko to pass the impacted matter. If the impaction isn't passed, the gecko will develop a thin tail as it loses weight, barely opened eyes, increasing lethargy, and a dark blue spot on his/her side. If any of these more extreme symptoms occur, rush your leopard gecko to a vet IMMEDIATELY. Impaction CAN KILL YOUR GECKO.
Prevention of impaction is extremely easy. Just use a substrate like repti-carpet, astro turf, paper towels, tiles, newspaper, brown paper bags, or shelf topping.
On rare occasion, there are other things that can impact your gecko. Sometimes, part of an undigested mealworm or other hard-exoskeleton insect can get lodged in your gecko's intestines. Sometimes a cyst will form inside your gecko's stomach or intestines and cause a blockage. However, that is an extremely rare occurance.