Inheritance lets you create a new class based on an existing one. The new class (called the child or subclass) automatically gets all the non-private fields and methods of the existing class (the parent or superclass).
Why does this matter? Without inheritance, you'd copy and paste the same fields and methods into every related class. A Dog class and a Cat class would each duplicate name, age, eat(), and sleep(). When you fix a bug in eat(), you'd have to fix it in every copy.
With inheritance, you put shared behavior in one Animal parent class. Dog and Cat inherit from it. Fix eat() once, and every child class gets the fix automatically.