Thoughtworks interview question

Explain inheritance.