First, recall the layers of the OSI reference network model and data encapsulation.
An application on PC1 sends data to another application located on another PC2. Starting from the top level (application level), data is sent to the network card at the data link layer. On it, the network card converts the frames into bits and sends them to the physical environment (for example, a twisted pair cable). A signal is received on the other side of the cable, and the network card of PC2 receives these signals, recognizing them in bits and forming frames from them. Data (contained in frames) is decapsulated to the upper level, and when it reaches the application level, the corresponding program on PC2 receives it.
The repeater and the hub operate at the same level, therefore, with regard to the OSI network model, they are depicted the same way. For the convenience of representations of network devices, we will display them between our computers.
Both devices are already at the second level, therefore, in addition to signal recognition (like hubs at the first level), they decapsulate it (signal) into frames. At the second level, the checksum of the trailer (trailer) frame is compared. Then, the recipient’s MAC address is recognized from the frame header and its presence in the dial-up table is checked. If the address is present, then the frame is encapsulated back into bits and sent (already in the form of a signal) to the corresponding port. If the address is not found, the process of searching for this address in the connected networks occurs.
You now have enough knowledge to determine which devices and how they work. If you still have questions, ask them to me and in the near future you or I or other users will certainly help.