Yeah, but it'd only be a network between the two PCs obviously... you wouldn't miraculously have internet access, but I'm assuming you knew that.
The easiest way is to just buy a crossover network cable and connect the two PCs with the cable. Put both PCs on the same network by assigning both a static IP address in the same network (ie: 192.168.1.1 and 192.168.1.2 with a subnet mask of 255.255.255.0).