The key is that the host is quite constrained in which box he can show you: He must always show you a box with a goat and he can never show you the box you initially picked. So the choice the host makes is less random than your (initial) choice and can give you new information.
In particular, only two different things can happen:
a) You initially picked the car. In that case, the host is free to pick any of the two remaining boxes since both have goats in it and neither were picked by you. In this case, it would be obviously unwise to switch.
b) You initially picked a goat. In that case, the host has no choice at all: They must pick the one box with the second goat, which leaves the last remaining box as the one with the car. So you should absolutely switch here.
If you knew whether you're in situation a) or situation b), you'd already have won the game: You could switch as needed and would always get the car.
Obviously though, you don't know. However you know that a) happens when you initially picked the car and b) when you didn't. You also know, you initially picked the car with 1/3 probability. So you know that with 1/3 probability you're in situation a) and with 2/3 probability you're in situation b).
Therefore, if you're just always pretend you're in situation b) and switch, you'll win the car with 2/3 probability.