Creating 2D cave/tunnel dynamically

Hi guys! first post here…
Me and my friend are trying to make a “cave-run” game. the idea is simple: you take control on a plane/spaceship and try to make your way through a cave. now our main problem is the cave. how can we create a 2D cave dynamically? ive tried to google it, but I just dont know what are the best keywords to get results (in other words, I have no idea what to look up for…). Can you guys please refer us to something helpfull? tutorials, keywords (even lmgfy pages are welcome) or the main idea, because we have no idea where to start…

Thanks in advance!!