system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does a government "shut down social media"?

I often hear that during times of unrest or insurrection, a government will "shut down social media." How do they selectively disable parts of the internet.  Do they control all the ISP's in their country and rely on their cooperation? Is there an infrastructure issue? Thanks for enlightening me.
gpt
In countries which practice broad Internet censorship, the government controls crucial parts of the network infrastructure--either directly or with the cooperation of Internet service providers. The government can direct domain name servers in the country to return no or the wrong IP addresses for certain domains, or direct ISPs not to allow connections to a blacklist of IP addresses. 

Both methods can be bypassed (e.g. using DNS and a proxy outside the country), but they may still be widely effective when the majority of people do not know how.