A computer network exists whenever two or more computers are linked together, whether by cables, fibre, or wireless signals, so that they can share resources such as printers, files, and internet access, or exchange data directly. The linking itself, the physical and logical connection between the machines, is what defines a network.
The other terms describe things that happen because of a network rather than the network itself. A connection is a general word for any link between two points and does not specifically describe computers joined for resource sharing. Communication is one possible outcome of a network (computers exchanging messages), but a network can exist purely for sharing a printer or storage device without any messaging taking place. Transfer describes moving data from one place to another, which is also just one activity that a network makes possible, not the structure that enables it.
When you see a question that names the act of linking machines together for shared use, the keyword to associate with it is always network, since networking is the umbrella concept and communication, transfer, and connection are all specific behaviours that a network supports.