Pregunta de entrevista de Siemens

How does inheritance work in programming?