USB is a popular standard and I was wondering whether there is some way to connect two or more computers using USB ports rather than the Ethernet ports.
Yes you can, but you need a specialized USB peripheral known as a USB bridge. A Standard A-to-A type cable would fit the connectors but it would damage your port and could even damage your power source.
USB.org used to describe this in their FAQ but is not currently available. They do however list the official spec but it's very technical: https://www.usb.org/document-library/usb-type-ctm-bridge-specification-v11
What the special cable does is provide a chip in the middle that acts as a USB Host, and then again, as a USB peer. This site shows such cable.
Combining this with a USB Hub you could create a small LAN, but it´s definitively not the way to do it, as Ethernet would have more performance and be cheaper.
Some suggestions already been provided, here is another one with pricing: http://www.datapro.net/products/usb-2-0-host-to-host-cable.html
Note that SuperUser also list a related question specifically for USB3.0 How do I connect two computers using USB 3.0?
According to this article, yes there is. It requires the purchase of a special cable, as an A-A cable would fry the computer.