Switch can operates with hubs also.
Hub
Computer Computer Computer Computer A B D C
Hub
Computer Computer Computer B D C
Switch
Hub
If the distance from the switch to the host is more than 100m, a hub or a repeater can be used in between of the switch and the host.
Normally switches operate at layer 2 and they are called L2 switches or Ethernet switches.
Some switches can operate at layer 3 where they can analyze the network layer packet [e.g. IP Packet] and take decisions. They are called L3 switches.