Earlier this year, a DMCA exemption expired, which made unlocking your iPhone not only illegal, but also punishable by a $500,000 fine, five years in jail, or both.
Today, Congress passed a bill that makes unlocking your phone without permission from your carrier legal. The bill was first unanimously passed by the Senate a couple of weeks ago, and the policy was unanimously passed by the House of Representatives this afternoon. The last step is for President Obama to sign the bill, which will officially turn it into a law.