in what form the data is flowing - digital or analog signal
That depends on your definitions. Imho, a signal in a cable is always analog but you could argue that there are distinct signal levels/symbols, making it digital.
Ethernet over twisted pair uses differential signaling. There are no absolute voltage levels but the polarity between paired wires is the signal - either pin 3 is positive to pin 6 are vice versa.
10BASE-T uses rather simple Manchester line code. Each symbol consist of a polarity change between the paired wires: -+
signals a 1
bit and +-
signals a 0
bit. There may be additional polarity changes in the signal, but there's always a change in the exact middle of a bit/symbol. This provides a DC-free, self-clocking signal.
100BASE-TX uses a more complex, 4b5b line code (for clock recovery) and MLT-3 signaling (stepping through +
, 0
, -
polarity states), increasing the bandwidth efficiency greatly. The signal is also scrambled to avoid DC bias. 100BASE-TX encoding was largely borrowed from FDDI.
1000BASE-T is pretty complex already, using four-dimensional trellis modulation plus scrambling over PAM-5 (five levels of differential voltage). The complex encoding is necessary to enable signaling over Category 5 cable with the same symbol rate as 100BASE-TX (125 MBd) and only moderately increased spectral bandwidth. This contrasts with TIA's technically simpler 1000BASE-TX which required Category 6 cable and failed to be implemented.
Note that only 10BASE-T and 100BASE-TX are using distinct transmit and receive pairs (dual simplex). 1000BASE-T and faster use four-lane full-duplex transmission across all four pairs with the help of hybrids and echo compensation.