Casting is a mechanism by which a programmer can change the interpretation of an object by the compiler. A static cast and dynamic cast both convert pointers between related types by performing a check to make sure that a pointer is being converted to a related type. However, the difference is that the static cast performs the check during compilation while the dynamic cast performs the check using runtime type identification (RTTI).