It's not always necessary to connect to a network when all you really need is a simple connection to one other computer to transfer files or exchange text messages. This kind of connection is sometimes described as an ad hoc network because it's usually a temporary link, established for a specific purpose and ended when it is no longer needed.
An ad hoc network can use any of these methods to establish the connection:
A direct wired connection between serial data ports, using a null modem cable
A cable connection between the IEE 1394 (FireWire) ports
A link between USB ports, using a USB-to-serial adapter at each end and a null modem cable
A connection through the public telephone network, between modems attached to each computer
An ad hoc Wi-Fi radio link
A link using infrared lightwaves between IrDA ports