Praying for the Ill
Answer: As regards obligation, you should bear in mind what our Talmudic Sages say (Mesechta Berachot 12b): "Anyone who is capable of praying for the good health of another and fails to do so is considered a sinner."
How does one pray?
One can pray immediately upon hearing the sad news or any other time by simply requesting in any language that "G-d should send a complete healing to the party (Hebrew name), the son of (mother's Hebrew name) along with all the ill of the Jewish people."
Including this prayer in the silent Shmoneh Esrei service in the blessing relating to health (which is to be found in virtually every siddur) is an even more effective way of praying. But perhaps the best way to pray for the sick person is while visiting him and his condition inspires you to greater sincerity. At the bedside there is no need to mention the patient's name because the Divine Presence is there.