The virtual keyword tells the compiler to generate a virtual table for the class and to put the function address into that table.
All derived classes will also have virtual tables with the address of the function that is in the base class or if overridden, the address of the function in the derived class.
A pure virtual functions tells the compiler not to instantiate the class.
That means fail all attempts to create an object of the class.
I have this article that might help you understand it better -
Polymorphism in C[
^]