Santiago is an old man, near to death, when he goes far out in the water fishing. As he defends his marlin unsuccessfully against the attacks of multiple sharks, he learns several things about death. First, he learns that death comes to every living creature. It is part of the cycle of life that includes all of us. The important aspect of death is not death itself, as that is inevitable. What matters the most is that the man of honor struggle against death as long as possible. As Santiago says:
"But man is not made for defeat," he [Santiago] said. "A man can be destroyed but not defeated."
This sense that one must fight to the last animates Santiago in his battle against the sharks. He loses against them--they eat the marlin--but that doesn't matter. What counts is that he gave his all in the fight against them. As he states:
I am too old to club sharks to death. But I will try it as long as I have the oars and the short club and the tiller.
He further decides:
I'll fight them until I die.
This determination to fight to the bitter end is what makes death worthwhile. While Santiago does not die at the end of the novel, he can in the future die in peace, because he has fought the good fight with courage and fortitude.
Beyond this, Santiago determines that "everything kills everything else in some way." This reinforces the idea that we are all part of a natural cycle of life and death. As he is in his boat, Santiago dwells on how he has lived by killing other creatures: that is what a fisherman does. Death feeds on life. Santiago also determines that because he loved the marlin, it was "not a sin to kill him."
The most important thing Santiago learns is to put death into the perspective of a larger picture of a cycle of life in which what counts is not whether or not you die, but how hard you fight.