Your real friends are those who remain your friends when you are really in need of help. True friends come to your aid when you most need them. It expresses the idea that, in times of difficulty, it is those who stand by you who are your true friends.
Another version of the proverb goes: A friend is never known till needed.
The proverb is thought to have originated in the late 1600s from the works of playwright John Heywood. The proverb appears in his play “The Spider and the Flie”, which was first published in 1546.