Typical garage door beams have two different parts of a beam (usually IR) on each side of the door: One unit is the IR transmitter and the other is the IR sensor-cum-switch. The switch is the two contact points of a NO (Normally Open) relay. As long as the receiver "sees" the IR beam from the transmitter, it keeps the relay activated its (the relay's) contacts remain closed. When something interrupts the IR beam (or if power to the transmitter or receiver fail), then the contacts go open.
As long as the contacts are open, circuitry in the garage door opener keep the door from closing. The protocol for stopping or reversing the action of the door is in the garage door opener control PCB, not in the IR beam receiver, if that helps understand how that works. The beam is just a transmitter that sends a focused IR beam and the receiver is just an IR receiver that closes a relay when it sees the beam and controls a relay. You can say it (its relay) gives the door opener PCB "permission" to close the door, but doesn't actually initiate opening or closing itself. When something breaks the beam (or power to either unit fails, or if the beam gets misaligned), "permission" is denied. Whether that causes your control PCB to stop the door closing or reverse the action and completely re-open the door depends on how you program whatever PCB you're working with.