Hub just duplicates the data on all ports (ie, if comp A sends a packet to comp C then computers B,D,E,F will also get the packet). Switch learns which MAC addresses are behind each port and doesn't just duplicate the data (ie, packet goes to C and BDEF lines are clear).
Good for speed and security.