The hub is simply a physical connection, so regarding ethernet protocols, there would be ethernet frame collisions if there are more than one host connected to. Its a broadcast domain.
The switch has an ASIC controller (the simples ones)which avoid ethernet frame collisions between ports. This is done thanks to a forwarding table inner the ASIC controller. So, it creates a broadcast domain in every switch port.
Of course, that a simple switch definition, because the switch is a kind of bridge device (IEEE 802.3D) and usually with more ports.
Hello...would like to ask if I can use Ethernet Switch as a Hub?
HUB and Switch both serve the same purpose but HUB is a dumb terminal while Switch is an intelligent device. Hub broadcasts while Switch reads the IPs and route the packets efficiently