The iPhone is such a desired device that it is almost impossible to get one for free. The next closest option is to receive a zero dollars down deal from a wireless carrier. T-Mobile and AT&T both offer this promotion.
Promotions like this usually have no down payment, but require an additional monthly payment with the wireless plan. However, you will receive the iPhone without having to pay anything right away. This is as close as you can get to getting a free iPhone.
Another way to get a free iPhone is to trade in previously owned devices to a wireless carrier for trade-in credits. These credits can be used toward the newly purchased iPhone. If the previously owned phone is as valuable or worth more than a new iPhone, the new iPhone will be free.
Unfortunately, pre-owned phones are typically not worth as much as brand new phones, so the phone will be heavily discounted rather than free. However, combining trade-in credit with zero dollars down can bring you an iPhone without paying or with lower monthly payments. There is no legal way to get a truly free iPhone without winning a contest or receiving one as a gift.