Switching is the process of using devices' physical addresses to perform forwarding. Switches use ASICs to switch frames at high speeds. The Spanning Tree Protocol (STP) prevents data loops by identifying redundant links and shutting down unnecessary ones. STP elects a root bridge and blocks ports on other switches to ensure only one path exists between switches. This allows redundancy while preventing switching loops.