What effect does closing a lid in some recipe do?
It holds in steam.
This increases the air temperature in the pan, which allows for more even cooking instead of just cooking the the food in contact with the pan.
It also slows down how quickly the food drys out, and may have other secondary effects, such as how fat renders from a piece of meat.