Thoughtworks Interview Question

Explain inheritance.