Obtaining a travel visa to Iraq is complicated and time consuming. You can obtain an application at the Embassy of Iraq in Washington, D.C.. However, all applications are vetted in Baghdad. Even if you do obtain a visa, you may still be refused entry into Iraq once you arrive.
Additionally, movement within Baghdad is difficult and entry into the International Zone, a.k.a. Green Zone, requires a pass or that you be accompanied by authorized officials. Iraq is a war zone and even if you're from a country which is part of the coalition, you will not be granted entry into the IZ without authorization. Most ex-pats and business travelers to Iraq hire a security detail which constantly monitors the security situation within Iraq and around Baghdad.
Travel outside the IZ is extremely dangerous. Roadside and car bombs are detonated every day in Baghdad. Many Iraqis are armed. Markets and popular gathering places are frequent targets of bombers. As a foreigner you are more likely to be targeted for kidnapping. Kidnappings are often financially motivated. These threats are not restricted to Americans or women.
You are also likely to be refused access to accommodation as Iraqis will fear being targeted for supporting the occupying forces.
Unless you are there for business, Baghdad is not safe for tourism.
Women travellers are urged to take particular care, and should only go to Iraq if absolutely necessary. If going there is a must, then it would be wise to take a man, for protection as single females are often targeted.
Visitors should take care to adhere to the dressing customs, eg, long clothes, with women's faces completely covered. Women who do not adhere to the dress codes should not be surprised if they are hissed at by strangers or verbally abused, or worse, beaten/whipped.
Islam is a prominent way of life for most Iraqis, if not all. You should take care not to blaspheme, or misuse the name of the prophet Muhammed in any way, shape or form, as doing such a thing could get you in big trouble.
There is a high level of armed crime in Iraq; many of the population are armed and more than willing to shoot.
If you are in Baghdad, you should leave immediately, if it is safe.
(smartraveller.gov.au)