It is just a wired-or gate.
It relies on the fact that most RS232 communication doesn't actually use full-duplex, where communication goes in both directions at the same time. Even though full-duplex is allowed for, what actually happens is that there is usually communication in only one direction at a time.
The transmit lines on RS232 are low when nothing is being sent. Most of the time both lines are low, the diodes are off, and the resistor holds the line low. When communication happens in either direction, one of the diodes conducts when the signal goes high, so the monitor can see the signal. The resistor pulls the line low when the signal goes low.