Yeah due to the need for backwards compatibility all of this sort of happens simultaneously.
By default the network card starts off sending out a 10Mbit ethernet idle signal since it has no idea what is on the other end, so it has to go for the lowest common denominator. However next to the idle signal extra pulses are sent to encode the network cards capability, this is how the other end can know what type of speed/standard it can use to talk to you. So once you see the idle signal you know somebody is there to talk to and the extra pulses tell you how fast they can go, at that point you can switch to the highest supported speed, declare the link being up and start sending data.
When the network card is not seeing any idle signal it just keeps constantly trying to reach out to the other side in hopes of getting a response. It could be that the cable is unplugged, the machine on the other end might be powered off, something is wrong on the line etc... One of the reasons there is no idle signal could also be that someone carelessly connected two network cards with a straight RJ45 cable, so the cards are both yelling into the same TX pair while the RX pair is quiet as both are listening there. On a older 100Mbit ethernet card the two cards would keep yelling on the TX lines and never hear back, so the link never goes up. However a smarter auto MDIX network card will occasionally randomly try swapping the TX and RX pairs, eventually the cards will get into a state where the TX pair of one card ends up going into the RX pair of the other card, suddenly they see each others the idle signal and the link goes up as normal.