DOS and DDoS attacks work by overloading a server's bandwidth and resources, making the server inaccessible. In a DOS attack, a single computer floods the target server with requests. In a DDoS attack, many computers coordinate to flood the target server simultaneously, multiplying the attack traffic. Attackers use tools and scripts to automate the generation and routing of excessive requests to overwhelm the target server.