First things first, here's a rough (and obviously incomplete) explanation. You'd differ between DoS and DDoS.
DoS (Denial of Service) simply put is using up the resources of the machine by leveraging on a weak spot of the program. You'll see often people targeting the auth server and flooding it with packets and if the server has bad code in it, it'll use up too many resources. This could lead to lags or in worst cases the server to not respond anymore.
Now, if you think DoS is bad, we're gonna take it to a new level: DDoS (Distributed Denial of Service). This time it's not only one pc trying to flood the server and consuming all it's resources.. it's a lot. The strength of the attack varies and depends on how many attackers are gonna target your server. There are many ways on how a DDoS works and you don't necessarily need to leverage on bad code in order to attack the server: Even a SYN/FIN Flood can make the server say bye bye - or at least it would, if it could.
Now let's get on how to protect against it. If you know how it works you can think about a few strategies on how to fortify against those attacks:
1. Make sure your source doesn't have flaws that could be exploited by attackers to use up your resources
2. Set up a good hardware firewall to block incoming attacks
3. Configure your firewall correctly to drop connections once a connections seems to go mad
4. Harden your system (there are some tunables you can set to harden your system a bit against attacks)
There are also more techniques (rerouting traffic, etc..) but I guess for the most people this does not matter too much.