The compiler inserts invisible casts for you and guarantees that they won't fail (assuming, again, that all of your code was compiled with a generics-aware compiler and did not produce or suppress any warnings).
This glosses over the fact that Generics is only a language construct. That is, the compiled output (bytecode) would be identical for code that had generics and code that doesn't-but-is-otherwise-identical.
In other other words, Generics is only a coding & compile-time protection; it has no direct runtime impact.