This meaning refers to the final stages, moments, or sections of something.
The story has two possible ends.
They met again near the ends of their careers.
This formal meaning refers to objectives or outcomes that someone wants to achieve.
They used legal means to achieve political ends.
The policy serves several economic ends.
This meaning refers to leftover, cut-off, or less useful final pieces of material or products.
The tailor saved the ends of fabric.
They sold damaged ends at a discount.