Let's ignore the Gigabit part for now, and focus on your "2 devices are sending at the same time" part for a bit.
On shared media, this can actually happen and be a problem. Most wireless transmissions are shared media, and Ethernet, back in the day, used to be:
- 10base2 (coax) used what was more or less a single cable with every one on it. Obviously, two (or more) stations were able to transmit at the same time;
- 10baseT and 100baseT (twisted-pair based), with hubs (rather than switches) also meant that two (or more) stations could transmit at the same time, as the signal received from any connected device was just repeated to all others.
Now, if two devices are sending at the same time, two things can happen:
you use some form of multiplexing (time division, frequency division...) that allows separate "channels" so that one can listen to a specific channel and not be bothered by the others. This is used a lot for wireless transmissions, much less for wired transmissions (WDM/DWDM on fibres being one exception).
or if two or more devices are sending at the same time on the same channel, then you get what is called a collision: like when two people are speaking at the same time, you can't understand what either says, receiving devices are not able to decode the data sent by any of the devices (or more often, they can decode it, but it makes no sense, and will not pass CRC checks).
This is where schemes like CSMA-CD (Carrier-Sense Multiple Access, Collision Detection) came in:
- Before trying to transmit, a device would check if someone else was sending (carrier sense)
- If the channel is free, it starts transmitting.
- But even with that, two devices can start at exactly the same time, so you can still have a collision.
- To avoid wasting too much time on the channel, the devices would detect collisions (by comparing what they send with what they receive: if it doesn't match, then it means someone else is sending at the same time), abort the transmission, and retry after a random delay (to try to avoid a new collision).
This was quite fun, and on lightly loaded networks it worked quite well, but as soon as traffic became significant, you would end up with tons of collisions, which in turn increase usage of the shared media, which in turns results in more collisions, so it could get pretty bad.
The answer to this was switching to full-duplex switched networks. Hubs just repeated the signal without thinking. Switches on the other hand really receive a frame, and then resend it on the destination link (additional bonus: the frame is not sent to everyone, just to the destination in most cases).
If two devices send to the same destination device, then the switch will queue one of the frames, so the two frames that were sent at the same time actually arrive one after the other at the destination.
Beyond that, on the physical level, it's quite possible data is exchanged over several pairs or even several cables in parallel. Whether this is done at the bit level or entire frames are sent on each pair/cable depends on the exact technology used. But I think that wasn't really your question.