When we're sick, we need to feel that others care and are ready to give of their time to us. Bikur cholim, visiting the sick, is the mitzvah that requires we do this.
It is considered such an important mitzvah that the rabbis say that through doing it we are imitating God, who came to visit Abraham when he was recovering from his circumcision (Talmud Sotah 14a).
Maimonides gives precise instructions as to how to fulfil the mitzvah, for example, not to visit during the first and last three hours of the day - as that is when the invalid receives treatment - or sit so that you are looking down on the invalid.
When Rabbi Akiva was leaving the home of a sick student, the frail boy called out "You just saved my life". At which Rabbi Akiva declared, "Anyone who does not visit the sick is like a murderer" (Talmud Nedarim 40a).
Holistic understandings of health shed light on the story. Boosting people's morale and raising their spirits when they are sick can help them to get better