Inheritance is a concept that often appears in OOP (Object oriented programming).
Beginners are often taught examples that are ideal for the concept of inheritance - e. g. the vehicel - car example.
Composition is the idea of enabling reuse of code without depending on inheritance.
In typical OOP languages, composition usually means creating classes that include instance of other classes - instead of inheriting.