Female cicadas lay their eggs in trees and shrubs. They cut slits with their ovipositor in which they lay eggs. When the larvae hatch from the eggs they are blind, look like ants, and are a sixteenth of an inch long. The larvae look around, finding a good spot to burrow because if they don't find shelter fast enough, they will die from the heat of the sun. If the larvae accidentally burrow into an ant hill, they will get captured and eaten.
Tiger beetles can hide and capture the larvae also.
When the larvae are digging in the ground they will run into small stones or tree roots which they must go around. When the cicadas are underground, and sucking on tree roots, they keep going deeper and deeper. This is because the burrow was too small, or it needed a larger root. The nymph's urine helps stabilize the walls of the burrow. I have found even more information about praying mantids.