Virtual functions enable runtime polymorphism. When you call a virtual function through a base class pointer, the actual derived class implementation is executed based on the object's dynamic type, not the pointer's static type. This allows base class pointers to correctly invoke derived class behavior.