The government orders the ISPs to cut the connections - how they ISPs actually do it is up to them - whether they power down the routers or simply enable firewall rules.
In small countries, especially in Africa, there might be only one or two Internet exit points for the entire country. It's not like the US where there can be a dozen or two Internet traffic exit points.
EDIT: Here's a relevant article by Cloudflare about the Syrian shut-off: https://blog.cloudflare.com/how-syria-turned-off-the-interne...