Unsullied battle tactics are based on the legions of the old Ghiscari Empire, involving large groups of them fighting in lock-step phalanxes using spear and shield, though they are also trained to use shortswords for close-quarters combat. Slave-eunuchs who have been trained from birth to fight, the Unsullied are renowned for their utter discipline on the battlefield, both in their usage of incredibly coordinated large unit phalanx formations, and because they will never break in the face of overwhelming odds, even to the point of death.
Because they are eunuchs, the Unsullied will not succumb to bloodthirsty or sexual urges in the midst of battle; their actions will only go as far as what they have been ordered to do, and nothing more. The Unsullied also seem resistant and even immune to pain. However, Unsullied do possess emotions and can show anger.
Four hundred years ago, 3,000 Unsullied saved the Free City of Qohor from destruction at the hands of Khal Temmo and his khalasar of 20,000 riders. Before the Unsullied have arrived from their long march, Temmo and his Dothraki massacred the Qohorik city guard and cavalry, while their two mercenary companies, one of them the Second Sons, broke their contract and fled. The Unsullied, however, slipped past the Dothraki while they feasted and were placed between the horde and the city. As the Dothraki have always held infantry in contempt, fit only to be ridden down, they charged instead of flanking them. Eighteen times the horselords charged and eighteen times the Unsullied locked their shields and held the line. By the end the battle only 600 Unsullied remained, but 12,000 Dothraki lay dead, including Temmo and his sons. The new Khal led the survivors past the city gates, one by one throwing their cut braids before the feet of the Unsullied. Since that day the Unsullied are employed both by cities and the rich of Essos.
Daenerys offers one of her dragons in exchange for 8,000 Unsullied and the boys still in training. The offer is accepted.
Daenerys meets with the Good Masters in a large plaza holding the entire force of Unsullied. She delivers Drogon and is given a scourge that symbolizes ownership of the Unsullied. Now their master, she orders them to kill all the Good Masters, soldiers, and slave overseers, spare the children, and free any slaves they find. After the sacking of the city is complete, she grants them their freedom and asks if they will fight for her as free men. After a few moments, they unanimously acclaim Daenerys as their leader and join her on her march.
As the march of Daenerys' host continues, the Unsullied - at Daenerys' request - choose their officers, as well as their overall commander. They choose Grey Worm. Later, they assume formation (without being asked to do so) in order to intimidate the ambassador from Yunkai. Grey Worm later leads the infiltration team into Yunkai itself; followed by a small group of his men, they rapidly overwhelm the city. When the freed slaves pour out of the city and approach Daenerys, the Unsullied assume defensive positions, but she orders them to stand down and goes out among the people.
In the books
In the A Song of Ice and Fire novels, the Unsullied are trained in Astapor, one of the three major cities of Slaver's Bay. They begin their training at five years old, when their genitals are fully removed. They are also given a puppy to look after, and at the end of the first year they must strangle the puppy to death. If they refuse, they are culled from the trainees and killed. They train from dawn to dusk until they have mastered the shortsword, shield, and three lengths of spear. Only one in three survives the training regime. They are given a beverage called the "wine of courage", which over years numbs their body's ability to feel pain. Upon being given the spiked cap which is the symbol of their rank, they must go to the slave market, kill an infant slave before its mother and pay the slave owner for his loss.
Their training is utterly brutal, designed not only to train them for combat but to strip them of any empathy, individuality, or sense of self-worth, in order to create soldiers who are willing to sacrifice their own lives if so ordered. Unsullied do not have permanent names, instead choosing new names at random every day, which are written on pieces of paper and then drawn by lot from a jar. Even these temporary names tend to be demeaning descriptors such as "Grey Worm", etc.
The extremely harsh training regime results in warriors who are unemotional, numbed against pain, and ferociously disciplined. They never loot or rape, they will hold against superior numbers, and will take their own lives if ordered to.
According to linguist David J. Peterson, the Dothraki respect the Unsullied so much that the Dothraki language does not derisively refer to them with terms that mean "slave" or "eunuch", etc. Instead, out of respect the Dothraki borrow the name that the Unsullied call themselves in Low Valyrian: "Dovaogēdy" (literally "unsullied". Plural: "Dovaogēdys"). Due to pronunciation differences, this loanword became "Dovoeddi" in the Dothraki language.
Unsullied serve under their own officers and function as small private armies which can be bought and sold. However, they are not mercenaries but slave-soldiers; they don't choose whom they serve, whom they fight, or if they are ordered to their deaths.
Though they are ferocious warriors, the Unsullied can become lazy if their mettle is not tested in battle. In the Free Cities, where they are usually employed as household guards who see little action, they can go soft.
Besides the forced custom of drawing new names every day, the Unsullied hold some customs of their own. They worship a goddess whom they refer to as the Lady of Spears, the Bride of Battle or the Mother of Hosts, but whose true name is only known to them who have burned their manhoods on her altar and may not be spoken of to outsiders. Unsullied purify themselves according to the laws of their great goddess; one way is to bathe in the salt sea.