Start here. This is the direct spoken answer to practice first.
Overview
Composition is not a slogan against inheritance; it is often the safer choice when behavior varies independently of an object's identity.
Composition means an object works with other objects to perform part of its behavior instead of inheriting that behavior from a base class. A CheckoutService can hold a PricingPolicy and a PaymentGateway and delegate to them. Those collaborators can change independently, and the service does not inherit their state or internal hooks. Inheritance is still appropriate for a true, stable subtype relationship. Composition is preferred when the relationship is has-a or uses-a rather than is-a.