A wired modem has the exact same functions as a wireless modem, so if you already know how to use wireless, you know how to work with wired modems, and vice versa. Wireless modems are just this, but without cables. Old Rednet APIs are even compatible with wired modems.
So let's say we have a setup like this:
Spoiler
We have sending and receiving code for both computers.
Left Computer:
local modem = peripheral.wrap('right')
modem.transmit(1,1,'Hello!')
Here we're wrapping the modem as a peripheral, like we would a monitor or printer. Then we use the .transmit() function to send a message, like rednet.send().
The first number is the frequency to send the message on. Computers that have modems opened on this frequency can receive messages on this frequency. In this example, modems that ran modem.open(1) will be able to receive this message, if they are connected in the wired network. You don't need to open your modem on that frequency to send a message.
The second number is the channel you want your senders to reply on. This is unimportant if you're only trying to send a message, but is helpful for creating servers. To get a reply, you have to open the modem on the frequency you want the reply on. In this example, if we wanted a reply, we would have to do modem.open(1) on this computer.
The message is self-explanatory. It's simply the string we send to other computers, like we would with rednet.send.
Right Computer:
local modem = peripheral.wrap('left')
modem.open(1)
local _, side, freq, rfreq, message = os.pullEvent('modem_message')
print('The message came on the '..side..' modem.')
print('It was on frequency '..freq..' and wants a reply on '..rfreq)
print('The message was: '..message)
Here, we're going to listen for the message that the left computer is sending to us. To do that, we have to open on the frequency that we believe the other computer is sending. We know that the left computer is sending a message on frequency 1, so we .open() on frequency 1.
When we receive our message, it's captured as an event, like 'key', 'char' or 'mouse_click'. The params for the event are side, the side of the modem we got our message from, freq, the frequency it was sent on, rfreq, the frequency we should reply on, and message, what the other computer sent to us.
Afterwards, we're simply printing the information we've received. Running this program first, and the program on the left computer afterwards should yield this result:
Spoiler
[anchor=peripherals]Peripheral Interaction
If, perhaps, you wanted to learn about peripheral interaction through cables, that's way easier. We'll go ahead and connect a regular old monitor to this setup.
Spoiler
In order to "enable" it, you have to right-click the connection to the monitor.
Spoiler
On the left computer, we can have this code:
local mon = peripheral.wrap('monitor_19')
mon.setBackgroundColor(colors.white)
mon.setTextColor(colors.black)
mon.setCursorPos(1,1)
mon.setTextScale(3)
mon.clear()
mon.write('Hello There!')
When we connect the computer to the monitor via modem and cable, then enable the monitor's connection, we instantly have access to the monitor, and instead of connecting to it though its side, we use it's "name". The name is given if you enable or disable the peripheral's connection, and in this case, it's monitor_19. From there, we would use it like any normal peripheral. The bottom is the result of running this script:
Spoiler
That should give a pretty good explanation on how to use the cables. Feel free to ask any questions.