There many things to know about Spanning-Tree, however knowing the difference between a few key terms will help you earn some points on the exam. The three things we'll be covering in this post is the difference between STP Roles, Modes and States.
Spanning-tree Port Roles
Spanning-tree roles describe what the switch's responsibility is for the LAN segment running STP. For example if a switch was elected the Root Switch, it's role would be to promote it's self as Root and start sending out BPDUs to other switches indicating the timers of STP such as the forward delay timer. There are only four types of Roles; Root, designated, alternate, and backup.
Root Port Role - The port that receives the best BPDU on a bridge is the root port.
This is the port that is the closest to the root bridge in terms of path cost.
The STA elects a single root bridge in the whole bridged network (per-VLAN).
The root bridge sends BPDUs that are more useful than the ones any other bridge
sends. The root bridge is the only bridge in the network that does not have a
root port. All other bridges receive BPDUs on at least one port.
Designated Port Role - A port is designated if it can send the best BPDU on the segment to
which it is connected. 802.1D bridges link together different segments, such as
Ethernet segments, to create a bridged domain. On a given segment, there can
only be one path toward the root bridge. If there are two, there is a bridging
loop in the network. All bridges connected to a given segment listen to the
BPDUs of each and agree on the bridge that sends the best BPDU as the
designated bridge for the segment. The port on that bridge that corresponds is
the designated port for that segment.
Alternate & Backup - These two port roles correspond to the blocking state of 802.1D. A
blocked port is defined as not being the designated or root port. A blocked
port receives a more useful BPDU than the one it sends out on its segment.
Remember that a port absolutely needs to receive BPDUs in order to stay
blocked. RSTP introduces these two roles for this purpose.
An alternate port receives more useful BPDUs from another bridge and
is a port blocked.
Information from http://www.cisco.com/en/US/tech/tk389/tk621/technologies_white_paper09186a0080094cfa.shtml#topic2
Spanning-Tree modes are simply the version of spanning-tree running. Over the years several different versions have been developed some Cisco Proprietary some created by the IEEE. Below lists these modes.
PVST+ or PVSTP - Per-vlan spanning tree "Cisco Proprietary"
802.1W Rapid Spanning-tree
Rapid PVST+ or PVSTP Cisco Proprietary version of RSTP
Spanning-tree Port States
For this post we're listing only the states for interfaces that are running 802.1D normal spanning tree protocol RSTP 802.1W has different names for these ports.