Use perlin noise for perlin worms?

I have made a flat world from using perlin noise. The world is made of cubes. (I know this is not the best for frame rate but im just using this for testing and will use voxel once im satisfied). But how can I use perlin noise for creating worm caves or even just circular caves? I can only seem to make the top layer of the terrain change not what is underneath. Thank you