The Iran-Contra report found that the sales of arms to Iran violated United States Government policy; it also violated the Arms Export Control Act. Overall, if the releasing of hostages was the purpose of arms sales to Iran, the plan was a failure as only three of the 30 hostages were released.
First arms sale
Michael Ledeen, a consultant of Robert McFarlane, asked Israeli Prime Minister Shimon Peres for help in the sale of arms to Iran. The general idea behind the plan was for Israel to ship weapons to Iran, then the US would reimburse Israel with the same weapons. The Israeli government required that the sale of arms meet high level approval from the United States government, and when Robert McFarlane convinced them that the U.S. government approved the sale, Israel obliged by agreeing to sell the arms.  Reagan approved McFarlane's idea to reach out to Iran on July 18, 1985 while in a hospital bed recovering from cancer surgery.  In July 1985, Israel sent American-made BGM-71 TOW (Tube-launched, Optically-tracked, Wire-guided) anti-tank missiles to Iran through an arms dealer named Manucher Ghorbanifar, a friend of Iran's Prime Minister. One hostage, reverend Benjamin Weir was subsequently released, despite the completed arms sale. This ultimately proved Ledeen's plan a failure  with only three shipments through Israel. 
Robert McFarlane resigned in December 1985. He was replaced by Admiral John Poindexter. On the day of McFarlane's resignation, Oliver North, a military aide to the United States National Security Council (NSC), proposed a new plan for selling arms to Iran. This time, there were two new ideas. Instead of selling arms through Israel, the sale was to be direct. Second, the proceeds from the sale would go to the Contras at a markup. Oliver North wanted a $15 million markup, while contracted Iranian arms broker Manucher Ghorbanifar added a 41% markup of his own.  Other members of the NSC were in favor of North's plan. John Poindexter authorized the plan, and it went into effect. 
At first, the Iranians refused to buy the arms at the inflated price because of the excessive markup imposed by North and Ghorbanifar. In February 1986, 1000 TOW missiles were shipped to Iran. From May to November 1986, there were additional shipments of miscellaneous weapons and parts. Reagan claimed that the total of all arms sales was less than a planeload.
The plan went ahead, and proceeds from the arms sales went to the Contras, a right-wing guerilla organization engaged in an insurgency against the leftist Sandinista government of Nicaragua. The diversion was coordinated by Oliver North of the National Security Council. Supporting the Contras financially was an effort to assist them in their fight against the Nicaraguan government.
Both the sale of weapons to Iran and the funding of the Contras attempted to circumvent not only stated Administration policy, but also legislation passed by Congress known as the Boland Amendment. Administration officials argued that regardless of the Congress restricting the funds for the Contras, or any affair, the President (the administration) could carry on by seeking alternative means of funding such as private entities and foreign governments.
The Contras were also involved in drug trafficking, as detailed in the "Drug money" section linked. A little more kool ayd to sip...
The Iran-Iraq War, also known as the Iraqi Imposed War (جنگ تحمیلی, Jang-e-tahmīlī), Holy defense (دفاع مقدس, Defa-e-moghaddas) and Iranian Revolutionary War in Iran, and Saddām's Qādisiyyah (قادسيّة صدّام, Qādisiyyat Saddām) in Iraq, was a war between the armed forces of Iraq and Iran lasting from September 1980 to August 1988. It was commonly referred to as the Persian Gulf War until the Iraq-Kuwait conflict of (1990–91), and for a while thereafter as the First Persian Gulf War. The Iraq-Kuwait conflict, while originally known as the Second Persian Gulf War, later became known simply as the Persian Gulf War.
The war began when Iraq invaded Iran on 22 September 1980 following a long history of border disputes and demands for the overthrow of Saddam Hussein's regime. Although the Iraqis attacked without formal warning, they failed to make progress and were soon repelled by the Iranians. Despite several calls for a ceasefire by the United Nations Security Council, hostilities continued until 20 August 1988; the last prisoners of war were exchanged in 2003. The war altered regional and even global politics.
The war is also noted for Iraq's extensive use of chemical weapons against Iranian troops and civilians as well as Iraqi Kurds.
Direct U.S. Support for Iraq had been wary of the Islamic Republic of Iran since the Iranian Revolution, not least because of the kidnapping of its Tehran embassy staff in the 1979-81 Iran hostage crisis. According to Robert Parry there was a secret encouragement by the US administration (President Jimmy Carter, conveyed through Saudi Arabia) which was embroiled in a dispute with the new Islamic Republic of Iran. In the words of Alexander Haig, secretary of state from 1981, "It was also interesting to confirm that President Carter gave the Iraqis a green light to launch the war against Iran through Fahd."  However, Dr. Zbigniew Brzezinski, President Carter's National Security Advisor (United States) does not support this assertion.
Starting in 1981, both Iran and Iraq attacked oil tankers and merchant ships, including those of neutral nations, in an effort to deprive the opponent of trade. After repeated Iraqi attacks on Iran's main exporting facility on Khark Island, Iran attacked a Kuwaiti tanker near Bahrain on May 13, 1984, and a Saudi tanker in Saudi waters on May 16. Attacks on ships of noncombatant nations in the Persian Gulf sharply increased thereafter, and this phase of the war was dubbed the "Tanker War."
In 1982 with Iranian success on the battlefield, the U.S. made its backing of Iraq more pronounced, supplying it with intelligence, economic aid, normalizing relations with the government (broken during the 1967 Six-Day War), and also supplying weapons. President Ronald Reagan decided that the United States "could not afford to allow Iraq to lose the war to Iran", and that the United States "would do whatever was necessary and legal to prevent Iraq from losing the war with Iran." President Reagan formalized this policy by issuing a National Security Decision Directive ("NSDD") to this effect in June, 1982.
Lloyd's of London, a British insurance market, estimated that the Tanker War damaged 546 commercial vessels and killed about 430 civilian mariners. The largest of attacks were directed by Iran against Kuwaiti vessels, and on November 1, 1986, Kuwait formally petitioned foreign powers to protect its shipping. The Soviet Union agreed to charter tankers starting in 1987, and the United States offered to provide protection for tankers flying the U.S. flag on March 7, 1987 (Operation Earnest Will and Operation Prime Chance). Under international law, an attack on such ships would be treated as an attack on the U.S., allowing the U.S. to retaliate militarily. This support would protect ships headed to Iraqi ports, effectively guaranteeing Iraq's revenue stream for the duration of the war.
An Iraqi plane attacked the USS Stark (FFG 31), a Perry class frigate on May 17, killing 37 and injuring 21. However, U.S. attention was focused on isolating Iran; it criticized Iran's mining of international waters, and sponsored UN Security Council Resolution 598, which passed unanimously on July 20, under which it skirmished with Iranian forces. In October 1987, the U.S. attacked Iranian oil platforms in retaliation for an Iranian attack on the U.S.-flagged Kuwaiti tanker Sea Isle City.
On April 14, 1988, the frigate USS Samuel B. Roberts was badly damaged by an Iranian mine. U.S. forces responded with Operation Praying Mantis on April 18, the United States Navy's largest engagement of surface warships since World War II. Two Iranian ships were destroyed, and an American helicopter crashed with no apparent combat damage, killing the two pilots.
In the course of these escorts by the U.S. Navy, the cruiser USS Vincennes shot down Iran Air Flight 655 with the loss of all 290 passengers and crew on July 3, 1988. The American government claimed that the airliner had been mistaken for an Iranian F-14 Tomcat, and that the Vincennes was operating in international waters at the time and feared that it was under attack. The Iranians, however, maintain that the Vincennes was in fact in Iranian territorial waters, and that the Iranian passenger jet was turning away and increasing altitude after take-off. U.S. Admiral William J. Crowe also admitted on Nightline that the Vincennes was inside Iranian territorial waters when it launched the missiles. . The U.S. eventually paid compensation for the incident (to non Iranian passengers of the airliner), but never apologized.According to an investigation conducted by ABC News' Nightline, decoys were set during the war by the US Navy inside the Persian Gulf to lure out the Iranian gunboats and destroy them, and at the time USS Vincennes shot down the Iranian airline, it was performing such an operation. What kind of games are We (and I mean the royal We.) playing here?