Com interfaces work generic, you get an instance without a clue whats in there. But you know from reading the api documentation.
In order to work with it further you need to assign (cast) it to the right type, at least in a strong typed language like C#. Now putting the type in front of the type with braces, is a so called C cast. If it fails it throws, and if uncatched it will crash your application. In Python you can do the same mytype(myinstance) -> Python (mytype)myinstance -> C#. Don‘t know if that’s actually working the same way.
C# offers another way in casting by using the as operator, which does not throw but returns a null value instead. But working with null (None=>Python)values is problematic as well.
Strings are a special case, because any class or struct can override a ToString() method, which, if overwritten, determines the string conversion.
In order to convert value types to other value types there is a Convert class which does that. This is where C and C# differs. Value types are float, double , byte, char etc pp.
Casting is not necessarily a conversion, it mainly is used to assign a generic or base object the right type. It works if the memory footprint matches if not it throws. If you get a GeometryBase object, you can try to cast it to a Brep, it will do if the instance is of that type, but it will throw if its a Mesh object for instance.