It is more complicated: You need to build a transmitter circuit which chops the IR source LED (about 50:50 duty cycle) at the same frequency as the receiver is rated for, say 40KhZ. This can be a 555 circuit as long as it is operated from a regulated voltage so that its frequency is stable.
When the receiver locks on to the IR signal, its output pin will be low as long as the 40kHz IR signal is present. If the 40kHz IR signal is interrupted, either by being shut off electrically, or by being blocked by an IR opaque object (your hand in the beam), the receiver output pin will go high, and then back low. The time it stays high tracks the interruption of the beam if that interruption is short (<a few hundred ms), or if the beam is interrupted longer, the output will go back low by itself after a few hundred ms even if the beam is still obstructed.
If you need a longer output pulse, that will take more circuitry.