Repeater recopy the data when its signal strength goes down. The data transfer is in the form of electrical pulses (Combination of 1 s and 0 s ). As this data signal travel in the network through the medium its strength goes down which results in the data lose.
A hub, also called a network hub, is a common connection point for devices in a network. Hubs are devices commonly used to connect segments of a LAN. The hub contains multiple ports. When a packet arrives at one port, it is copied to the other ports so that all segments of the LAN can see all packets.