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.
There's a famous phrase that relates to the Albigensian Crusade, "Kill them all for God will know his own!", which while perhaps not wholly accurate does represent the sentiment of the times.
To our amazement, crying "to arms, to arms!", within the space of two or three hours they crossed the ditches and the walls and Béziers was taken. Our men spared no one, irrespective of rank, sex or age, and put to the sword almost 20,000 people.
—Arnoldus Amalricus, 1209
As the town of Béziers 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. 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.
Kill some... / Sell or Ransom the rest
However, in most cases all of the enemy were not slain. Only a specific part of the enemy's force, if any—and this was perhaps more atypical than typical—was killed on the field and this because of specific animosities or some other reasons.
For example, Muslims considered members of the Christian military orders as a type of knights who should be beheaded as the knights' rules forbade them being ransomed. Therefore, after Hattin, Salah-ad-Din had the 200 captured Knights Templar and Hospitaller beheaded. Also, the Knights' turcopoles suffered the same fate because Salah-ad-Din considered them turncoats—if they had just been normal opponents, the turcopoles would have been sold into slavery. Captured infantry was sold into slavery and knights, especially if they were of the higher nobility, ransomed.
Additionally, the German Order's rules said that knights couldn't retreat from the field even when wounded—victory or death being the two permissible options. Therefore, in cases where the situation was dire because of poor decisions, the Knights found themselves rather committing the rest of their forces than retreating, as at the Battle of Saule where the Sword Brethern's Herrmeister Volkwin had first advised other Christians to attack on foot, but when they refused, the Sword Brethern stayed with the rest of the forces (and were cut down).
A similar order was given by Henry V at Agincourt despite the army originally expecting to gather French prisoners and sell them for ransom (as was . 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 French lords were spared for their generous ransoms.
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'