As you already know, hatches in DBD spawn at random to help survivors to escape the map. Once you find the hatch, you have to open it. If there are two or more survivors left, you need a Skeleton Key or a Dull Key to open it. The hatch will only remain open for 30 seconds, so survivors that didn’t make it to the hatch on time will have to find another key to open it again. However, if you’re the only survivor left, the hatch will spawn and remain open until you reach it or until the killer closes it. If survivors manage to open the exit gates and the killer closes a hatch afterward, a mechanic called “Endgame Collapse” is implemented, and survivors get limited time to escape. Hatches only start spawning when the number of repaired generators exceeds the number of remaining survivors by at least one, or when there’s just one survivor left.