Islam teaches us different manners of life to make us good human being. It guides us about each and every matter about living our life. it guides about our duties as well as our rights. Visiting the sick is also an Important manner which Islam has taught us. its the Sunnah our our beloved Rasool Muhammad SAW to visit the person who is sick and make dua for him.
Some scholars are of the view that its a fard kifaayah and other says its a Sunnah. If the person who is sick is a non muslim you can also visit him. there is nothing wrong in doing so.
Here are some Hadiths on Importance of seeing the sick:
Hazrat Abu Musa (R.A.) reports that the Prophet (pbuh) said, 'Visit the sick, feed the hungry and free the one who is imprisoned unjustly.' [Sahih Bukhaari]
'The best type of visit to a sick person is when the visitor gets up to leave without delay.' [Bayhaqi]
when you visit the sick person you should care about his rest. don't stay for too long. don't speak too loud.
Following is dua which Prophet Muhammad SAW used to recite for the sick person:
Adhhib al-ba’s Rabb an-naas, wa’shfi anta al-Shaafi, laa shifaa’a illa shifaa’uka shifaa’an laa yughaadir saqaman