They are a fact of life, especially when taking part in activities like climbing or hiking in the mountains where numerous predictable but difficult to avoid hazards, like rockfall, occur. We get complacent and feel invincible, but I know from personal experience that one day all of us will be present when a friend is injured, or when we get hurt ourselves.
What you should do:
1) Make sure no one else gets hurt.
Check that whatever happened no longer poses a risk, and then safely approach the injured person.
2) Stabilise the patient.
You will die fastest from blood loss, next if you cannot breathe and lastly shock and hypothermia.
So manage these in that order. Check for heavy bleeding and learn how to make a pressure bandage and improvise a tourniquet (a sling and a stick).
Make sure the injured person can breathe and maintain an airway (recovery position if unconscious).
Lastly, make sure that the patient is warm and will stay that way. Put them on something insulating and tuck spaceblankets under their clothes.
3) Contact help.
See the numbers below for the MCSA rescue teams nationally. First contact the local emergency services as they may be closer and able to respond sooner. Please also contact the closest MCSA team. Our teams work closely with the local emergency services may be able to support or follow-up more readily, where appropriate.

Finally, keep in mind that it may take a long time for help to arrive. Until then you should not stop playing a constructive part in the rescue. Apply first aid, provide accurate information on your situation, help the first responders to access your location and very importantly prevent the incident from becoming worse by staying safe, taking shelter, watching out for weather etc.