Pergunta de entrevista da empresa OpenTable

Describe how inheritance works in object-oriented programming.