How does a computer distinguish two separate transmissions on a wire My basic idea of networking at the lowest layer is that one computer will send a bunch of parallel bits at a time down a cable and another computer will read these bits.  For example, computer #1 sends a bunch of parallel bits to computer #2.  Computer #2 then gets the bits then waits for the next bunch of bits.  And so on.

I have a couple of questions about how this works and how we get around a few problems.

Problem #1: Say Computer #2 doesn't wait long enough for the next series of bits.  Computer #2 may accidentally read the first set of bits twice, messing up communication.

Problem #2: Computer #2 waits too long.  It doesn't read the second set of bits in time and only starts reading after the second set of bits are shown.

[to summarize problems 1 &amp; 2, it seems like it would be very difficult to exactly sync the rate of transmition between the two computers)

Problem #3: We can't rely on every transmission to be different.  So it's not like we can just wait for the transmission to change and then store the new value.

Problem #4: Say we use a special phrase.  So after every transmission computer #1 signals to computer #2 that the transmission is going to change by flashing a bunch of 1's.  This is a problem because what if our data is a bunch of 1s?  We won't know if the transmission changed or not.

The only solution I can think of is to have some extra bit that alternates for each transmission, bit this seems like it wouldn't work for one-bit-at-a-time transmission networks like wifi. What part of all of this am I missing?  How is this problem solved in the real world?
On a wire you encode bits by changing the voltage, for example +5V could mean 1 and -5V could mean 0. If you do this naively you get problems with long sequences of 1's or 0's. For example you mentioned clock drift, i.e. when do I know that one 1 ended and the next 1 starts? But it's also problematic to have one voltage for a long time, because charge could build up at one end that needs to be dissipated somewhere.

So instead of using a naive encoding, we use a trick. For each bit we use two clock cycles, and encode the bit as the change in voltage. This way we implicitely also transmit our clock down the wire, the receiver can synchronise their clock using the same edge detection algorithm that they use to read the bits. This scheme is called Manchester code.

If you use more voltage levels to encode multiple bits at a time, the same basic idea can be applied. Instead of encoding the bits naively, we ensure that there is enough change in the data so that we can keep the clocks synchronised and the voltage on average 0. Check the related articles in the Wikipedia, for example 8b/10b encoding.