Virtual destructors are defined in the base class and used to delete derived class objects through a base class pointer. This ensures proper deletion of class objects, particularly when resources have been allocated dynamically.