That's what I can hardly understand. How they seem to be virtually non-existent. Surely they should have an army of a few thousand reasonably equipped men. We've even spent several years training them.
It's complicated. Iraq isn't a coherent nation-state in the sense that say, America or France is. It's split between roughly three regions: al-Sawad - the south-eastern alluvial plains of the Tigris and Euphrates rivers, al-Jazira (not to be confused with the news network) - the western arid and semi-arid deserts and plains, and Iraqi Kurdistan, amongst the mountains to the north. These geographical regions coincide quite strongly with the ethnic and religious make-up of Iraq: Shia Arabs in al-Sawad, Sunni Arabs in al-Jazira, and Kurds (mostly Shia) to the north. Now, the Iraqi army took in Shia Arabs and Sunni Arabs and trained them both, but Nouri al-Maliki, the Shia Prime Minister, distrusted the Sunni Arabs, largely because they resented the fact a Shia was leading the country and also he was fairly nepotistic in favour of other Shias. This meant he stationed all the Sunni Arab soldiers in Sunni areas and all the Shia Arab soldiers in Shia areas.
This is problematic because the Islamic State plays strongly on the narrative of "Sunni-vs.-Shia", and draws young men who it radicalises from the various Sunni towns and cities. That means the Sunni soldiers stationed in al-Jazira have to fight people of the same religion and ethnicity of them, with a cause that they may at least partially sympathize with, and often as a result of local postings against people they actually know and are familiar with. The result is that a small number have defected entirely, a very large number deserted entirely, and the remainder were no match with their poor numbers and low morale against totally fanatical and dedicated militants.
The Shia element of the Iraqi army is still intact, and is still largely competent, which is why IS hasn't made much progress into Baghdad, despite having cut off most of the major supply lines from al-Jazira into Baghdad. However, they're stretched thin and have no incentive to try and retake areas of al-Jazira, because Baghdad is a hugely important city but also effectively cut off from much of the rest of the Shia area, meaning immense effort is required to keep it from falling into the hands of the IS. This means that IS and the Iraqi administration are basically at a stalemate. The trouble is, IS is growing all the time because it doesn't just operate in Iraq, but is drawing in recruits from radicalized Sunni Arabs from the rest of al-Mashrid (the Levant), but also the rest of the world.
It's a similar situations with the Kurds. The Kurds actually one of the most effective militaries of the whole Levant area, only out-matched by Israel. However, they lack the ability to organize effectively because they don't have a state, and NATO can't really interact with them effectively because Turkey would throw a massive diplomatic tantrum. That said, the Kurds have done a remarkably good job at helping even non-Kurdish areas - the tiny territories where Yazidi, Christian, Druzi and other such minorities actually form a local majority almost all border Kurdistan, and the Kurds have gone out of their way to help these people, which is beyond admirable. Unfortunately, they can't win every time and the current crisis is an example of where they've been unable to do so.
Frankly, the situation is not going to be resolved without the intervention of a major power. If the United States doesn't act soon, then Iran probably will - it has a large interest in ensuring that a Shia-led Iraq remains a stable neighbour.