A proper 802.1d STP implementation will correctly detect and sever a loop caused by a hub or switch that spans two ports in the same STP domain (e.g., the office user who knows just enough to be dangerous, and accidentally plugs two wall-jack ports into the same hub). The STP switch(es)' ports will transition to LISTENING on link-up in which they will send out periodic STP BPDUs and will NOT forward traffic. Once each port sees the BPDU from the other the switch will flip one of those ports to BLOCKING, while the other can time transition into FORWARDING. In a proper STP implementation, at most one of those ports is ever FORWARDING (the other in LISTENING or BLOCKING) and therefore there's no way the broadcast packets can loop around.
A SOHO switch or hub, or even properly designed managed switches with STP disabled, will just pass the STP BPDUs on from the received ports to all the rest. This is the behavior that allows it all to work; there's not really a difference between a dumb switch/hub connecting two STP ports and a crossover cable connecting them, from STP's perspective.
If you configured your STP to defeat this safety mechanism (e.g., Cisco's port fast), you lose.
Modern switches also contain capabilities like the abilty to disable ports automatically if they receive too many broadcasts, or to rate-limit broadcast traffic, or at least to filter out broadcast traffic. Unfortunately, many switches' CPUs deal with broadcast storms by falling over. One of the things that separate the men from the boys in the switch business.
spidey07, "spanning-tree is the devil" is a bit harsh. Spanning tree is a good protocol for solving the problem that it was intended to solve -- detecting loops caused by bridges in Ethernet networks. It's simply being stretched WAY beyond its design intentions. It was in particular never intended to be used for switched station ports. And STP & VLANs remains a major kluge fest. Too many people get frustrated by the trademark 802.1d 30s of silence when you plug a port in (esp. if you have stupid NICs that toggle the link state when you reboot the PC), and configure STP in a way that effectively disables its upside while maintaining much of the downside.
My only real true beef with STP is that it fails the obviousness test -- that is, I can build you a network topology rather easily where if I take five experienced network guys and ask them all how the traffic flows, at least one of them will get it wrong, probably a majority. It requires a strong understanding of the protocol just to know how the tree is really going to get built, and what it is going to do if some arbitrary link gets cut. And that is very bad. Many many networks I have seen where people designed a beautiful redundant structure that STP will not use the way that the designers thought.
Saulbadguy, the Ethernet spec caps the number of stations on a network at 1,000. I don't know if the IEEE specs relax this, but it's a very good limit. You might do some research and see if you can find something in writing to back that up. 7,000 stations on the same broadcast domain is a design that asks for trouble. Also, it's 2006. In generaly, you don't bridge between sites. Maybe back when the world was IPX or some similar, but we have IP and fast routers/L3 switches now, there's no excuse for not separating sites into routed networks.