There are a whole bunch of behaviors that constitute war crimes, down to using artillery on areas where civilians are present (even when enemy soldiers may also be there); also burying enemy soldiers without recording their identities and burial locations and giving that information to an international agency like the Red Cross.
But the most basic of war crimes is to make war on another nation. So leaders of nations like the United States have devised a number of scenarios that give them fictional cover for their war crimes. "We were attacked first," is a standard one, and was also used by Germany when it attacked Poland, launching World War II. This was the excuse used when the U.S. launched its attack on North Vietnam following the Gulf of Tonkin Incident. Which for the most part took place only in the minds of Lyndon Johnson and high-ranking Pentagon types who were looking for an excuse to launch a war.
The other big, common excuse, most used by imperialist nations, is the "we were invited" excuse. You find some faction that does not like the current system of government in a nation, and you get them to invite you in. Voila, you are not committing a war crime, you are aiding what you quickly prop up to be "the legitimate government."
In the Vietnam War, this was the excuse for U.S. troop deployments in South Vietnam prior to the Gulf of Tonkin Incident. In the present war against the people of Afghanistan, this was part of a dual-excuse for war crimes strategy. We were invited by the Northern Alliance to help them overthrow their enemies, the Taliban.
Contrast President Franklin Roosevelt's behavior during the civil war in Spain (1930s), where he refused invitations to intervene on the side of the elected, democratic government because he did not want to alienate the powerful Catholic voting block within the Democratic Party of the United States. The Catholic Church supported General Franco.
Jeffrey Gentleman (a pseudonym?) wrote an article, "U.S. Aiding Somalia in its Plan to Retake Capital", published in the New York Times March 5, 2010, stating that the Obama administration plans to escalate the war in Somalia. The U.S. already provides substantial military aid to the "government" of Somalia. Gentleman quotes an unnamed U.S. official as saying that U.S. Special Ops troops will be involved on the ground.
The situation in Somalia is both complex and obscure. A few years ago the Islamic Justice Courts were set up and were very popular with a people tired of crime and war lord rule. The Bush administration overreacted to the Islam word. It set up an unpopular government of war lords which then called in an invasion from Ethiopia. This just led to the spreading of more radical, more militant Islamic groups. So today the U.S. is supporting a "moderate" Islamic government against Islamic enemies, some of whom are certainly influenced by Al-Qaeda. And why should they not be? Was not Al-Qaeda's central political thesis, that the U.S. is at war against Islam, clearly proven in Somalia?
The U.S. has no business in Somalia. Its 30-some years of meddling have consistently made matters worse. An invitation from Sharif Ahmed, whose government would collapse in three days if it were not a puppet government for the U.S., is not an invitation from the Somali people. Strangely, Sharif Ahmed is the former commander of the Islamic Justice Courts.
Al Shabab, who control the capital, Mogadishu, are the de facto government of Somalia. I don't like Al Shabab; I don't like religious fanatics. Within the context of better governance for Somalia, I liked the Islamic Justice Courts. But it is up to the people of Somalia to decide their own affairs. President Barack Obama will be committing a war crime if he uses U.S. soldiers in Somalia, or even supplies air support for the Ahmed faction. It is Barack Obama (and his predecessor George W. Bush, and pretty much the entire U.S. military industrial complex) who needs to be arrested and tried for his crimes.
Both the Democratic Party of Barack Obama and the Republican Party should be banned as war crimes organizations. Because that is what they are.