means that
surviving hardship can sometimes develop resilience or strength. The saying expresses a possibility, not a guarantee that suffering always improves people.
comes from
An aphorism of the 19th century German philosopher Friedrich Nietzsche.
When if you overcome a difficulty, you obtain experience and self esteem , so you become stronger, the saying “What doesn't kill you makes you stronger” is appropriate.