The government breaks out spending on the category called 'international affairs' into several sub-categories shown in the pie chart below. Out of $27.7 billion spent on international affairs in fiscal year 2006, $7.4 billion, 25%, is spent on international security assistance. Most security assistance is to help other countries to buy U.S. weapons. Some security assistance is for other military aid programs such as military training of other countries' troops. While security assistance is actually military support to other countries, these military programs are not included in what the government labels as 'national defense,' which is a category of the federal budget.
Another sub-category of spending includes international development assistance and humanitarian aid. This includes aid for disaster relief, refugee programs, disease programs and various humanitarian initiatives. It also includes about one billion dollars for the war on drugs in South America, money many would describe as military aid.
Other money is spent on the conduct of foreign affairs such as State Department operations, embassy maintenance and security, and contributions to international efforts. Foreign information and exchange activities includes international broadcasting and other minor information programs.
Finally, there is also a sub-category of spending for international financial programs such as the foreign military sales trust fund and the Export-Import Bank. But these programs in many years take in more money than is spent and thus appear in the budget as a negative amount, which is why this category is not shown on the graph.

Source: Office of Management and Budget, Budget of the U.S. Government, FY2007 [1].