It's simple most internet blocking just sinkhole's L3 traffic.
Deep packet inspection does happen but it's usually very rare on a large scale even for big operations like the "Big Firewall of China".
The most common form of internet censorship is through blocking IP addresses/ranges, and ports, the next common one is using DNS redirection for additional filtering. URL and packet inspection (keywords) happen but are quite rare, selective protocol filtering (deep packet inspection/IX) can happen but it's very rare on national scales.
Complete internet blockage is usually done simply through BGP, the government simply publishes new routes for all of their ISP's which usually just direct to a blackhole, since BGP is insecure in general an ISP can technically redirect traffic on it's own if it wants too and it did happen several times before (hacking team allegedly published rogue BGP routes to sniff traffic).
OSI Layer 3: https://en.wikipedia.org/wiki/Network_layer
Could you explain a little more about this?