What eludes me is how the president is able to shut down the government, and why nothing has been done about it.
The US president can veto budgets of the federal government. That means, some branch of the government doesn't have any money. If they don't have money, they can't pay their employees. If they can't pay their employees, then all employees that are not absolutely essential are sent home without pay, and the others have to work for free.
Why is the US president able to do this? Because that's what the US rules are like. Can anything be done about it? As long as the president vetos these budgets, nothing can be done about it legally. The only thing that can be done is to somehow convince the president to give up his veto.
So how was Trump convinced to give up his veto? There will be many reasons. One, there are now a lot of people who will never, ever vote for him as president again, and they were getting more. Calling employees "patriots" for working for free probably didn't go down well with them, and recommending they take out loans to feed their kids didn't go down well either.
Two, many industries are suffering, and they put pressure on Republican politicians to change Trump's mind. For example, I'm told the fishery industry had problems because they can't get permissions that they need to go fishing. Airports have problems. Essential workers who are not paid suddenly get ill and the work isn't done. In two months I'd bet every single unpaid government worker would stay at home because of the flu.
Three, the area around Washington is suffering economically. There are hundred thousands of people not spending one penny that they don't have to spend. No new cars, only the cheapest clothing, only the cheapest food, to make your money last longer. That hurts the economy. And that creates complaints against Trump.