Explain the difference between a virtual function and a pure virtual function, and describe how the vtable works under the hood.