First, make sure you have "connected" the modem to the peripheral and computer. That took me a moment to figure out. Note the name it tells you, because that will become important very shortly.
Second, wrap your modem. This will reveal a list of functions, obviously.
Third, use modem.getMethodsRemote(peripheral_name).
Fourth, use callRemote(peripheral_name, function_name).
So, write would be used like this:
modem = peripheral.wrap("right")
modem.callRemote("monitor_0", "write", "Hello, World!")
Supposing the name is correct.
Also, I just noticed you can grab the names into a table using getNamesRemote. And I think there is a way to wrap them, but I'm not entirely sure how yet.
EDIT: YEP! Can wrap! Just use the remote name as the side!