This statue is of the Old Testament figure David from David and Goliath (1 Samuel 17). In the legend David is roughly 13 years old and accepts the challenge to slay the giant, Goliath. The Philistine giant is killed using a sling and catapult, and David thereby saves the Israelites.
Donatello's First David
Donatello was originally commissioned to sculpt a David for the 'operai' of Florence Cathedral to be put with 12 other statues on the Cathedral buttresses. This was because David had become an emblem of Florence. In 1401, Rome, a super power state, attempted to besiege Florence (a much small state) and had failed. Therefore, the Florentine people felt the story of David and Goliath exemplified their situation.
However, the statues were too small to be seen from the buttresses in the end so were taken down and unfortunately just stayed in a workshop for several years, until it was finally moved to the Palazzo della Signoria.
Donatello's Second David
In c.1440, Cosimo de Medici commissioned Donatello to sculpt a second David for his courtyard in the newly build Medici Palace.
This David is a free-standing bronze male nude. This was the first free-standing and therefore unsupported statue of the Renaissance.
He is in contrapposto, where the weight of an individual is on one side. He has also been depicted in quite an effeminate manner as he is quite a pretty, ideolised and slim boy; It has been said that Donatello was probably gay, which is why David here is quite erotic. At the time Donatello was also accused of casting the boy live because of how spectacularly naturalistic he is. Additionally, David is standing triumphantly holding Goliath's sword and with his left foot on Goliath's head which is in the box.
This statue is an example of an exploited use of bronze, for example the negative space, and the sword which would have been almost impossible to carve (if the statue had been marble for instance). On the one hand, it is quite similar to Donatello's statue of St. George because David can also be viewed from all angles. However, on the other hand, the placing of the statue suggests a classical revival, because of its placing in the courtyard - in Gothic-style sculpture (like St. George) statues tended to be an integral part of architecture, however the David here is not in a niche, but is free-standing.
This David highly resembles Hermes or Mercury, the Messenger God. David also wears Hermes' attributes - the hat, boots and the feather that protrudes from Goliath's helmet. This reflects how Cosimo de Medici was a political messenger between courts with his eloquence and diplomacy. The fact that he is naked is also extremely classical and synonymous with antiquity - a complete revival. The message being represented here is similar to before - that smaller powers can take on any larger power through the use of cunning and wit, not through thugery.