With static typing the computer doesn't "understand" your code. It just automatically checks the correctness proof you've presented to it. And the correctness is limited only to certain properties of the program, that a given type system supports.
In case there are readers not familiar with the current state of things, you can pick solid languages today whose type systems support a LOT. It is completely fair (and good) to point out that this isn't a panacea, but it can significantly help.
I could say "python is better at understanding what the programmer wants to do". But I think you'd disagree with me.
The compiler is doing lexical analysis of the program being fed into it. That's it.