"Triage" is a French word meaning a separation or sorting. In a medical context, that's exactly what it is: sorting patients, separating sick from less sick.
Emergency medical care is not first-come, first-served. If a patient with a finger laceration arrives in the emergency department first, and then a patient with an acute heart attack comes in second, the heart attack gets rushed into a room and the cut finger gets to wait. Triage is the process of ensuring that care goes first to those who are in the most urgent need.
Though prioritization happens in all medical care, and especially all nursing care, not all of it is called triage. The word connotes rapid assessment of an unknown patient before care has begun.
Many different triage systems exist, each designed to meet a particular set of goals. What they have in common is that they are systematic. Emergency situations do not allow enough time for arguments or confusion over what is being prioritized. Any given service or hospital will choose and adopt a single triage system, so that all staff are on the same page, and priorities are consistent no matter which staff member is sitting at the triage desk.
For example, one system widely used in US hospitals is the Emergency Severity Index. This system assigns five levels of priority. ESI level 1 means a patient who will certainly die unless they receive immediate lifesaving treatment. Level 2 patients are not actively trying to die this minute, but must be seen without delay because they are at high risk of having their condition deteriorate. At the other end, level 5, are those who can wait an extended period of time without worsening of their condition.
A patient in cardiac arrest, or with massive blood loss after a traumatic amputation, will be assigned ESI level 1 (and hopefully will have arrived by ambulance with care already underway). A patient with an asthma attack will probably be level 2 because the condition can become life-threatening if untreated. The patient who comes to the ED for sniffles or a prescription refill is probably a level 5, and may expect to spend a few hours cooling his heels in the waiting room.
Not all triage systems prioritize in the same way. In the case of a major disaster or overwhelming mass casualty, when resources are overwhelmed and not all patients can be saved, different systems are used. In those exceptional circumstances the most critical patients are not taken first. Instead, any who are not likely to survive even with assistance-- those without pulse, or without breathing, or with massive and unsurvivable injuries-- are initially given no care other than pain medication. They are placed last in line, so that resources can first be devoted to those who can be helped.