Even though Iraqis are now in charge of the country, there are still many thousands of foreign troops there.
They've been training Iraqis how to form their own army and police force, as well as trying to keep the country safe.
But some people in Iraq want all foreigners to leave straight away, and think that by attacking them they will force them out.
It's thought some of the bigger attacks may even be the work of the terrorist group al-Qaeda.
Some of these people think the government led by Saddam Hussein should still be in charge.
There also problems because the people in Iraq are split into groups that don't get on with each other, mainly because of religion.
Although almost all of them are Muslims there are two different branches of the faith - Shia and Sunni.
There are more Shia in Iraq, but traditionally the country has been governed by the Sunni minority.