One interesting example of this is the creation of "lava trees" or "tree molds." When lava flows through a forest, it can cover the trees. As the lava cools and hardens around the trees, the trees burn away, leaving hollow spaces in the hardened lava that look like the shape of the trees.
Lava can also form fascinating structures called "lava tubes." Lava tubes are tunnel-like passages created when the outer layer of a lava flow cools and solidifies while the hot lava continues to flow inside. After the lava flow stops, the lava tube remains, creating unique underground passages. Some lava tubes can be very long, stretching for many kilometers, and people have used them for shelter and exploration throughout history.