Virtual functions are only used when you implement polymorphism.
C++ polymorphism is used by creating derived class objects and using them through a base class pointer. The virtual keyword tells the compiler that if there is a choice between calling the base class method or calling the derived class method, it is the derived class method that is to be called.
When doing things this way it is the base class that has the interface to the hierarchy. Derived classes are to implement methods declared in the base class. However, if the derived class chooses to not implement a method in the base class, then the base class must implement that method in order for things to compile.
The pure virtual function is just a virtual function like any other virtual function except it cannot be called by an object of its class. That is, if the pure virtual function is declared in the base class, you cannot use a base class object to call it. This forces the derived class to implement the method or things won't compile.
To make sure you don't even try to call the pure virtual function from its class, the compiler will not let you create an object of that class.