There are a lot of ways to combine two computers into one network, from wires to wifi modules. Use the cheapest method available at cost.
To combine two stationary computers into one network, you need to: buy or make a cross-cable and make some network configuration settings in the operating system.
Purchasing a crossover cable
You can buy a cross-cable (it is also called a "reverse" patchcord) in almost any specialized store that sells equipment for creating computer networks. There, such a patch cord can be made in your presence of the length that you need. In addition to specialty stores, such patch cords are often found in regular computer stores.
When buying, pay attention to the plugs (connectors) of the cable, or rather, to the cores of the wires inside these connectors. The color sequence of the wires on one side of the patchcord should be as follows: orange-white, orange, green-white, blue, blue-white, green, brown-white, brown. On the other side of the cable: green-white, green, orange-white, blue, blue-white, orange, brown-white, brown. This is a very important point, and if you are given a "straight" patch cord, i.e. the color sequence of the wires on both sides will be the same, then it will not work to connect two computers without purchasing additional equipment.
Insert the purchased patch cord into the connectors of the network cards of the system units.
Setting up the network configuration of operating systems
Configure the first computer. Click Start - Control Panel - Network and Sharing Center - Change adapter settings (for Windows 7 and 8).
On Local Area Connection, right-click and select Properties from the context menu. In the window that appears, select "Internet Protocol Version 4 (TCP / IPv4)" and click the "Properties" button.
In the "General" tab, select "Use the following IP address:". Fill in the activated fields: "IP-address:" - 192.168.0.1; "Subnet mask:" - 255.255.255.0.
Click Start - Control Panel - System. In the "Computer name, domain name and workgroup settings" section, click "Change settings". On the Computer Name tab, click the Change button. In the "Computer name" field, using Latin letters and numbers, enter the name of the first computer. For example, Comp1.
Do the same for the second computer, just specify a different "IP address" and "Computer name". For example 192.168.0.2 and Comp2.