system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does adblock work and why doesn't Youtube get around it?
gpt
In very simple terms, it is just a blacklist that prevents certain domains or subdomains from loading. In more complicated terms, it also parses the sites source code and looks for things like iframes etc. to unfuck the site layout after the ads have been taken out.  
  
Also, websites rarely "notice" you having adblock and instead opt for a simpler solution: They'll just put these shaming messages in a layer under the ads so they only become visible when the ads are blocked out. It is possible to detect, but more complicated. Maybe someone with webdev experience can explain it in more detail.  
  
As to Youtube not caring...my guess is that Google generates enough revenue from their other projects.