Without Spanning Tree Protocol (STP) or Rapid STP (RSTP), a LAN with redundant links would cause Ethernet frames to loop for an indefinite period of time. With STP or RSTP enabled, some switches to block ports so that these ports do not forward frames. STP and RSTP intelligently choose. In 2001, the IEEE introduced Rapid RSTP as 802.1w RSTP provides significantly faster recovery in response to network changes or failures, introducing new convergence behaviors and bridge port roles to do this. Please note RSTP was designed to be backwards-compatible with standard STP, link below with more information about these to protocols.

Click here for the link.