A homework assignment for all: Go read this article about how to behave and react when faced with the news that someone you know has cancer or some other lovely problem that could be life threatening and/or long term.
The author does an excellent job. I couldn't have said it so well at all. I can sum up my feelings in a much shorter list (I think).
First of all expect that you are going to do it all wrong - especially if you react like I would with a case of foot in mouth disease. When I was first diagnosed I finally got my husband to read a book called the Breast Cancer Husband. He told me he liked it because it started off by saying that however you reacted when your wife told you she had breast cancer, you did it wrong. But that's okay because probably nearly every husband did it wrong as well. The point is we are not perfect and it can be very difficult to keep one's mouth shut and contain one's reactions.
Never assume the worst. Life as a patient is full of rosy optimism because we couldn't handle it any other way. You don't need to be cheerful but you can try to be normal.
Just because someone you know was successfully treated for their disease, doesn't mean it will work for the person you are talking to. This is my pet peeve. Just because your neighbor's cousin's hairdresser's dogwalker's nephew had the same thing 20 years ago and did (or didn't) make it, things are different. Every cancer is different. Every disease is different. Medical science is progressing and treatment protocols change. Keep your mouth shut here as well.
Don't assume they are unable to do things unless they tell you. I was offered meals on wheels or some other food delivery service and was offended. I love to cook, no one was going to bring me food unless I was in a coma.
Whatever you do don't break down in tears or start wailing to the gods or praying out loud while you are with them. If you feel the need to do so, wait until you are in the privacy of your own home.
What can you do? Ask how they are doing. Treat them like a normal person. Tell them about the jerk at work who makes your life miserable. Tell them about the adventure you had when you tried to go shopping for new shoes. See if they want to get together. Even people in treatment might want to meet for a cup of coffee. Maybe you could stop by and say hello.
Sick people are still people. They need to hear about real life as well - even if they are trapped in an endless round of medical visits and treatments. We may have had our own mortality shoved in our face a bit more forcefully than expected but we still have feelings and hope.