The Hammer and Anvil strategy is a very old, yet highly successful military strategy going back to Alexander the Great (and probably even older than that). Small wonder then that it's a popular strategy in Warhammer as well. But while it can be extremely effective, rarely do I see armies that bring an ideal army setup to execute on the strategy.
For those of you unfamiliar with the concept of the Hammer and Anvil, the idea is that two hostile infantry units engage to the front while being unable to break one another, while the cavalry would come from one of the sides, smash into the flank of the enemy and help turn the tide of the combat in our favor.
Although actual cavalry can be very effective in this role, I've come to depend on a number of different units to serve as the role of the Hammer for this strategy. Here are some of my qualifications for being a good Hammer unit.
Fast
Unless an opponent is extremely outnumbered, you will rarely see a second infantry unit being able to outflank an enemy, mainly because they are too slow and too easy to redirect with chaff units. With a faster unit, it is more possible to put pressure on an enemy light units early on, forcing them to dedicate to redirecting you or simply lose a lot of their chaff units before your infantry units dedicate to combat.
In my opinion, a unit of 10-15 Orc Boar Boyz make for a better Hammer unit than 25 Black Orcs, even though the Black Orcs would stomp their faces in a straight up fight. Getting a 4" moving infantry block into the side-facing of an enemy is a lot more difficult than what it seems, mainly because of swift reforms, as enemies will insist on keeping both of your infantry units in their front, forcing you to miss valuable turns slowly moving into position rather than taking the charge to them.
Hard hitting
If you do manage to get into combat as flanking hammer unit, you are unlikely to be left there on your own for very long, because you're then the most serious threat to that enemy unit. That means you have to be able to dish out a lot of damage quickly, ideally before the enemy even gets a chance to get rid of you.
This is why I prefer a Giant as a Hammer over, say, an Arachnarok Spider. The Giant has the potential to dish out more S6 wounds than anything else in our army, which is enough to wound a majority of our enemies on 2+, while the Arachnarok will struggle to wound enemies at T4 consistently, even though the Spider is probably more likely to win and survive a combat than the Giant is.
Small footprint
The best flankers are the ones that won't take many casualties back after dealing out their damage. The best way of accomplishing that is usually to have as few enemies being able to strike as you as possible. The smaller the base of your unit is, the fewer attacks you will have being directed as you.
With this in mind, I would probably prefer a Goblin Wolf Chariot as my hammer over a unit of Squig Hoppers, even though the Squig Hoppers should do more damage. But in order to get all the Squig Hoppers in base contact, I would have to live with more enemy units being able to strike at them as well, while the Chariot will do the same damage regardless of how many models are touching its base.
Few wounds or high armor/toughness
Following on that logic, if you do get attacks aimed at you, make sure that the chances that you are hurting them more than they could possibly be hurting you are as high as possible. You can accomplish this by either having as few wounds as possible while dishing a lot more on average (a S5 Snotling Pump Wagon with a single wound remaining is a great example of this)
This is why I would prefer an Arachnarok Spider as a Hammer over 10 Savage Orc Boar Boyz. While the Savages should do a bit more damage on average (depending on the situation), they are also more prone to giving up wounds than the Arachnarok, who has a higher armor save and a higher toughness.