This is what happens when you plug in a cable:
Listening state: Only a root or designated port will move to the listening state. The alternate port will stay in the blocking state. In the listening state the switch tries to figure out what the topology looks like. No data transmission occurs at this state and after 15 seconds we will move to the learning state.
Learning state: At this moment the interface will process Ethernet frames by looking at the source MAC address to fill the mac-address-table. Ethernet frames however are not forwarded to the destination. It takes 15 seconds to move to the next state called the forwarding state.
Forwarding state: This is the final state of the interface and finally the interface will forward Ethernet frames so that we have data transmission!