Do iphones require a carrier plan?
If an iPhone does not have a SIM card, it will work with WiFi.

However, if the iPhone is locked to a specific carrier, you can only activate it by plugging in a valid SIM card for that carrier. Once activated, the iPhone will be usable without a SIM card.

In the US (I am assuming you are in the US), most iPhones are sold as being locked to a carrier, and unlocked iPhones are rare. Outside the US, unlocked iPhones are more common.