A mixture of different reasons, some of which I agree with, some of which I don't.
I used to be a strongly anti-communist libertarian in high school, and I think the old anti-communists and "super patriotic" Americans are partly correct.
Some foreign leaders, and their followers, really do seem to hate the USA due to jealousy and envy, and because our political freedoms, our religious freedoms and our (relative) sexual equality threaten their traditional values.
We allow more religious diversity than almost any other society on earth, and some people loathe the very notion of this.
We also still allow an amazing degree of freedom of the press and have made extremely impressive steps -- though they're still incomplete -- towards women's equality, as well as the free expression of sexual desire, that are remarkable threatening to more buttoned-up societies.
Recently our liberal politicians and a remarkably large swathe of the American public have come to support legal equality and legal freedom for LGBT people -- a stupendous revolution in moral values, whether you love it or hate it, that goes against centuries if not millennia of anti-gay traditions, especially in the Judaeo-Christian societies of the West.
People in some traditional countries truly hate and fear this, and loathe the US for allowing it. Many supporters of traditional religious values and national cultural traditions likewise hate Hollywood and American TV for threatening to replace values they cherish with a cultural diet of cheap food, easy sex and materialistic greed -- at least as they see it.
Yet while some people hate us for our best virtues, other people hate us for our worst faults.
Whether we like to admit this or not, the USA for the past 2 centuries has been one of the most militarily expansionist nations on earth.
We have done things like gobbling up Native American aka "American Indian" lands and slaughtering many of the original inhabitants, stealing most of the Southwest US and California from the Mexicans in the 1840s, overthrowing a native monarchy in Hawaii and annexing the place, and seizing Puerto Rico from Spain in the 1890s and turning this former Spanish colony into a U.S. colony. For many years, we also held the Philippines as a US colony, too.
To much of the world, this history of violent conquest and expansionism makes us a bully, and a successful one, and no one who's been victimized by a bully can really love another bully. We evoke bad memories of national oppression and national humiliation by outside conquerers.
As a country, moreover, we unfortunately haven't confined our aggressions to seizing territory from the Sioux, the Iroquois, the Cherokees and the Mexicans.
Since around 1900, the United States military also has waged wars & staged occupations in dozens of different foreign countries, many of which never attacked us: instead, we've strong-armed their governments and sometimes occupied their lands in a true "imperialistic" fashion.
For example, the US since 1980 has attacked, invaded and/or militarily intervened in: Mexico (several times under Woodrow Wilson alone), Cuba (repeatedly), the Dominican Republic (in 1965, under Johnson), Haiti (repeatedly), Nicaragua (repeatedly), Panama (5 or 6 times, starting in Teddy Roosevelt's day), Libya (2 or 3 times), Vietnam, Laos, Cambodia, Lebanon, Iraq (twice), Afghanistan, Somalia, Grenada, Greece, and several other places.
Our CIA and our State Department meanwhile have worked over the past 75 years to destabilize governments -- in some cases, democratically elected ones, in other cases, dictatorships -- in Iran (1953), Guatemala (1954), the Congo (1960), Chile (1973) and some would argue, Indonesia (1965), among other places.
Although the American presidents always declare that the United States stands for "freedom" and "democracy," US foreign policy also has repeatedly supported fairly brutal military dictatorships in places where we believed we needed to crush popular leftwing uprisings -- or more recently, where we thought we needed to crush radical Islamist movements.
Thus the United States has supported really horrible and dictatorial governments, some of which tortured political dissidents, in such countries as Brazil (1964), Argentina, Uruguay, El Salvador, Egypt, Zaire (= Congo during the 1960s, 70s and early 80s), and also in places where we had first helped put dictators in place through CIA-inspired coups or military interventions: Indonesia, Greece, Panama (at least sometimes), Honduras, and Portugal through the late 1970s.
Many people around the planet, therefore, hate and fear the United States as being exactly what President Reagan called the old Soviet Union: an "evil empire." Or as the radical Islamist revolutionaries of Iran put it in 1979, as the "Great Satan."
Our military aid and diplomatic help for Israel since its founding in 1948, and the uses that the Israelis have found for US military equipment in conflicts with the Palestinians, meanwhile have made us immensely unpopular in many Arab societies.
So there are logical reasons why many foreigners hate the US government, although there also are some powerful reasons why some foreigners like us or even love us.
For example, some people for helping to defeat Hitler and the Japanese empire in World War II, for example, and for promoting our own brand of human rights in countries that felt oppressed by old-style Russian Communism. I've met Nigerian immigrants in Washington DC who believe the Clinton administration quietly strong-armed a Nigerian military dictatorship into restoring democracy in that country, and who believe the US is the best country in the world for this reason.
As a society, of course, the USA has a long and sometimes violent history of racial conflict and racial injustice, and some foreigners also hate us for this reason -- regardless of whether they're guilty of racial injustice themselves, naturally.
-- democratic socialist /
"To tell the truth is revolutionary."-- Lasalle