Spies played an important role in the Civil War by obtaining military intelligence for both sides. Some examples of spy roles included gathering troop movements and positions. If caught, spies faced severe punishment and could be executed or imprisoned. Women played a significant role as spies, such as Belle Boyd who gathered information in various disguises. Notable spies included Timothy Webster who obtained Union plans, and Mary Bowser who worked as a slave to gather Confederate intelligence before disappearing after the war.