Type casting in Java allows an object to be treated as another type. There are two types of casting: implicit casting, which Java performs automatically when types are compatible in the class hierarchy, and explicit casting, which requires a cast operator inserted by the programmer. Explicit casting may be necessary to call methods of the target class when the object type is of a subclass within the hierarchy.