Now that you are done wading through the bullshit above, let me give you the real answer, assuming you even care to know the truth.
Before the Iranian revolution when we were friendly with Iran, i.e. Iran was our bitch, Iran paid us a lot of money for for some military hardware. Before we delivered said hardware, the Iranian revolution happened, and we never delivered the goods, nor returned the money. Now there is no legal precedent for being allowed to steal someone's money after entering in a contract just because you decide you suddenly don't like the other party. Iran had sued the United States to recover this money with interest, and the US losing that case was considered inevitable, as it should be. With this being the case, the US decided to use the quick resolution of this case as leverage in a negotiation, which is what I call good negotiating since that leverage would eventually become worthless regardless.
Now anyone telling you otherwise, or calling it ransom, is simply lying to you, especially the republican politicians who are well aware of what I typed above, but they know their constituents will believe their lies, and the right wing media won't set the record straight since lying to you is pretty much their business model.
So there it is. I know facts can be uncomfortable at times. If you are a right winger and didn't know this, you should really ask yourself why.