Virtual functions allow polymorphism by implementing a common interface in base and derived classes that can be called dynamically at runtime. They are declared with the virtual keyword in the base class and overridden with the same name and parameters in derived classes. Pure virtual functions are virtual functions without a body declared using =0, making a class abstract that cannot be instantiated until overridden in derived classes. Virtual destructors ensure the correct derived class destructor is called when deleting polymorphic objects through a base class pointer.