A hub is a dumb switch. It forwards any packet sent to every computer on the hub, increasing overall hub traffic, which can have an affect when doing heavy transferring to computers on the hub.
A switch is the better choice. It forwards packets only to the proper destinations by only sending it to the port it's suppose to. This reduces the latency and traffic for all the computers on the switch.
Hubs these days are good for really simple things, for instance, a group of computers that browse the internet or email. Things that are small and won't bog down the traffic on the local hub.