Such military action may or may not have targeted civilians directly, and may or may not have had the purpose of causing civilian casualties.
One example of unintended civilian casualties is when an aircraft targets a bridge with a missile, then lauches the missile, and the pilot realizes that a bus full of women and children is driving onto the bridge. The bridge explodes, collapses, and the bus and its occupants are destroyed.
Other kinds of civilian casualties may involve the bombing of military productions centers and their supporting civilian centers (see WWII Allied bombing of German cities). A more complicated example of civilian casualties involves the targeting of combatants who are using civilians as human shields. This causes a lot of moral wrangling among professional armies, either because of their aversions to targeting civilians, or because of the negative propaganda value of such casualties.
When a military action has for sole purpose the killing of civilians, such action is generally termed an atrocity, and is prosecutable as a war crime. Professional armies do not, as a matter of policies, commit such acts. However, some members of such armies do on occasion, under the stress of the moment, and are sometimes dealt with harshly.
Targeting civilians with military forces generally results in strong and vociferous international condemnation.
The United States military has historically been willing to attack civilian targets if it will suit its military objectives. During World War II, the US participated in the bombing of Dresden in World War II, the firebombing of Tokyo, and even used the atomic bomb against two enemy cities (the only nation in the world to do so). Similar bombings of civilian targets occurred during the Gulf War. See Strategic bombing for more information. The negative propaganda value of such bombing campaigns, however, has let US to tout its so-called "smart munitions" and its more accurate targeting systems, which create fewer civilian casualties than previous bombing technologies. However, civilian casualties still result from such bombing campaigns.
Another type of civilian casualties is accidental targeting, generally because of stray munition (missiles, small arms fire) or inaccurate targeting (bombs, artillery shells).
Humanitarian aid workers are given special protections under international humanitarian law, and yet attacks on them still occur.
See also: Collateral damage