Switches are best used to connect individual devices so that no connected device receives data that isn’t intended for it, while hubs are best used to connect switches together into a larger network, as the data can be sent between switches without spending time working out which switch is the correct destination, which would slow down the data transfer speed.