This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class. The latter is accomplished by having the derived class member function call the base class member function, if desired. The compiler uses the static type of the pointer to determine whether the member function invocation is legal. If the type of the pointer can handle the member function, certainly the pointed-to object can handle it as well. E.g., if Vehicle has a certain member function, certainly Car also has that member function since Car is a kind-of Vehicle .
Dynamic binding is a result of virtual functions.
Non- virtual member functions are resolved statically. The compiler creates a v-table for each class that has at least one virtual function. The v-table itself has pointers to each of the virtual functions in the class. When you may delete a derived object via a base pointer. This is generally A Good Thing.