This paper focuses on Spanning Tree Protocol (STP), IEEE Standard 802.1D. But first, it's important to understand the functions of an Ethernet LAN switch:
Address learning
Address filtering
Forwarding of frames
Loop avoidance
The way a switch learns Ethernet (MAC) addresses is by inspecting the Ethernet frame and recording the source MAC address in a dynamic table. The switch will also associate a learned MAC address with a port. It can then make intelligent forwarding decisions based on the destination MAC address. This white paper illustrates the process.