Amazon interview question

How do virtual functions work?