Dwarves with the health care labor enabled (default) will rescue wounded fellow dwarves from the battlefield (any location on the map really), and place them in a bed. The trigger seems to be "can't move himself" as both unconscious dwarves and those with wounded legs are rescued. It can take quite some time until a dwarf gets assigned to the job, possibly implying that the task is still a bit buggy (one would expect it to be high priority). It is suspected that activating/deactivating the injured dwarf may re-query the task.
As with any civilian job, the presence of nearby enemies will cause a dwarf to cancel their Health Care mission of mercy, and instead flee in fear.
Also, injured dwarves displaying the rest status won't eat or drink themselves. Instead they will be given food and water by a dwarf with health care enabled. For giving water, a bucket stored on a furniture stockpile, and obviously a water source, is required. If the dwarf is not supplied by his comrades, he will starve/dehydrate and die.
Sometimes an injured dwarf will cancel his resting and simply display "No Job" while still lying in bed; while dwarves may still bring food and water, the injured dwarf will become increasingly drowsy and eventually go insane. This can be remedied by removing the bed from underneath them, causing another dwarf to come save them, but the problem will typically happen again later.
As injured dwarves require watering and feeding, hospital beds are best placed near a water source. Due to what is most likely a bug, dwarves will not use wells when giving water to injured dwarves but will instead insist on getting water from a river, most often the cave river.