Is there a flap in the throat that open and closes. What is it call

It is epiglottis. It’s a flap of cartilage at the root of the tongue, which is depressed during swallowing to cover the opening of the windpipe.