This is a very broad question. Firstly, the Middle Ages span ten centuries and the entire world (even if the question seems to be directed towards Europe). Secondly, battles between two Christian European kingdoms would have had a slightly different aftermath to battles between pagans and Christians, Muslims and Christians, or excommunicate Christians and Christians.
Kill them all...
There's a famous phrase from the Albigensian Crusade, "Kill them all for God will know his own!". As Béziers had offered resistance to a Papal army and refused to give over their heretics, a sally from the town was turned around and the town conquered. The legate in command of these forces reputedly used the above phrase to express his orders, but it demonstrates the modus operandi of the Crusader army which killed nearly all of the menfolk if not the women and children as well (details are unclear). Looting in this case would have been entirely the case of the attacking army (and primarily its nobles). No specific mention is made of the wounded (but there were no defending soldiers left by the official tally).
Kill some of them...
However, in most cases all of the enemy were not slain. In most cases, only a specific part of the enemy's force was killed on the field, if any at all, and this either because of specific animosity or some other reason.
Muslims considered members of the military orders as one type of knights who should be beheaded as their rules prevented being bought out. After Hattin, Salah-ad-Din had the 200 captured Knights Templar and Hospitaller beheaded. Also, their turcopoles had the same fate though this was mostly because Salah-ad-Din considered them turncoats—if they had just been normal opponents, the turcopoles would have probably been sold into slavery. Other knights were sold into slavery or, if they were of the higher nobility, ransomed. The German Order's rules said that knights couldn't retreat from the field even when wounded—victory or death for them.
A similar move was ordered by Henry V at Agincourt despite the army originally expecting to gather prisoners and sell them for ransom. The two contemporary reasons for this are either Isembard d'Agincourt's attack on the English camp where they captured some loot or the regrouping of the third French battle which tried to counterattack. The English had also not secured all their prisoners nor accepted their surrender. Only the most prominent lords were spared.
St Rèmy, who witnessed the massacre, describes them as 'cut in pieces, heads and faces'. Indeed that was the only place where a knight in full armour was truly vulnerable. Only if they removed a man's helmet or lifted his visor could he be killed easily. Those who resisted even this would have been stabbed through the eye-slit in their bascinet. Such cold-blooded killing appalled contemporaries not so much for how it was done, although that did matter, but for whom it was done to. The men killed were noblemen and gentlemen, not the low-born who were expected to die in a battle. The men who wrote the accounts came from these upper classes, and such brutal realities clashed with the image of war as a gentlemanly pursuit, which they generally promulgated.
—Bennett, 'Agincourt 1415'
More common at the extremes of the continent where the religious aspects were different (Catholics fighting non-Catholics), many of the defeated side could expect to end up as tools diplomacy or in slavery. The first would generally be the case for higher nobles and and example is given in Gerard de Ridefort who was given freedom for ordering the surrender of a castle.
At Lake Peipus, the Estonian auxiliaries retreated before engaging, the German Order's knights were cut down (though six were captured), and other captured knights were taken back to Novgorod as prisoners. The prisoners were led to Novgorod tied to horses, and later exchanged as part of peace negotiations.
Preparations for taking prisoners were noted by the Polish when they reached the camp of the German Order after Tannenberg:
His [King Jagiello's] men helped themselves to the contents of the Order's headquarters:
'They found wagons loaded with handcuffs and shackles which the enemy had made ready for the Polish prisoners. The other wagons were full of torches soaked with tallow and tar as well as arrow prepared the same way to wound the defeated. But thanks to their faith in God, the Pole were putting them into their own chain and handcuff: ... It took only a quarter of an hour for the king's army to loot a few thou and wagons.'
—Turnbull, 'Tannenberg 1410'
This is also notable for the King had captured wine and alcohol smashed to prevent his troops from getting drunk—clearly afraid of a counter-attack.
Looting & Burial
After Hastings, William organized a burial for the Norman wounded though the English may have been simply left in the field.
On Sunday 15 October [the day after the battle] the day was given over to burial of the Norman dead. Those English men or women who came to the field were permitted to take friends or relatives away, but many were left on the ridge in the same way as at Stamford Bridge, where Orderic reported seeing piles of bones some 70 year after the battle.
—Gravett, 'Hastings 1066'
At Towton (from Gravett, 'Towton 1461'), one of the few mentions regarding wounded people is made in the middle of battle, implying that they were tying their wounds before heading back into the fray. Once the commanders of the Lancastrians fled, the melee broke up as well with the troops routing. The Yorkists gave chase, of course, and the terrain made escape difficult. Lancastrians were cut down in many directions, with plenty drowning in both the Cock and the Wharfe. Edward used the promise of looting the equipment from the dead to keep his troops working through the night in hostile countryside. Dead soldiers were buried in trenches dug by Saxton church.
As Tannenberg took place in territory hostile to the Germans, Turnbull describes that local peasants would have wandered into carnage, finishing the wounded Germans, and looting the dead. Grave pits were dug for both dead Polish as well as German troops with allies and enemies buried together.
Meanwhile, Flodden is noted for minimal clemency for the defeated for the English judged the Scots to have fought so ferociously as not to deserve mercy. The wounded of armies also received no great assistance while the survivors helped themselves to loot:
Guarding the captured gun that night must have been a grim chore, the men utterly exhausted, numbed by the ebbing of the great adrenaline rush that had kept them alive that afternoon. Around them lay the stricken remnants of a proud army. No silence reigned, but the continual moaning and calling of the hundreds of wounded who suffered, unaided in the cold night air. By dawn, many would have died, some quietly slipping away from shock and loss of blood, others more speedily dispatched by the packs of human predators that would be skulking in the darkness: camp followers and locals who had crept out in search of loot, ferreting amongst the dead and dying - human jackals, the carrion of war.
—Sadler, 'Flodden 1513'