The primary Spanning Tree Protocol (STP) is IEEE standard 802.1D, an algorithm commonly used on Ethernet networks. This algorithm works by limiting the paths messages can travel at any given time to a fully connected tree rather than a mesh. As hosts join and leave the network, this protocol dynamically updates the tree accordingly.
A variant of STP called Rapid Spanning Tree Protocol (RSTP) is also now part of the IEEE standard and is the recommended version for use today. RSTP improves the performance of spanning tree updates when the network configuration changes.