The virtual keyword enables runtime polymorphism. When you call a virtual function through a base pointer, C++ calls the derived class version. Without virtual: Base* p = new Derived(); p->func(); calls Base::func().
With virtual: calls Derived::func() if overridden. Add virtual to functions you expect derived classes to override: virtual void draw() { } The derived class overrides with: void draw() override { } Virtual functions have a small runtime cost (vtable lookup), but this is usually negligible.
Use virtual when you need polymorphism; it's what makes OOP powerful.