How does iPhone's facetime work even when the phone function is off? It's a bit inconvenient that iPhone's FaceTime can only be used on WiFi. And yet you call people by using their numbers.  

But my mom's iPad only has wifi and she has no number, and I call her iPad via my iPhone by using her email address. I don't quite understand how it knows her iPad and makes the connection? Is it through her Apple ID? 

What's doubly confusing is when I traveled to Europe for a couple months I put my iPhone account on hold; so text and phone did not work. I kept the wifi on though. But I was blown away that mom could still call me from her iPad. Somehow FaceTime worked though WiFi with my phone number even though my phone account was turned off? I'm assuming it somehow associated my number with my Apple ID, but wow, I'm confused?
Initially Apple used the phone number as the FaceTime "account" and non-user-visible SMS validation as the "password" to avoid forcing end users to enter/remember/forget yet another set of credentials. 

The SMS validation happens behind the scenes - but SMS does have to be active on the phone at the time of first verifying (and potentially when re-verifying?) your FaceTime account on Apple's servers. If you switch off FaceTime in the Phone settings, wait a few seconds and turn it back on - you can see this checking process. The status message will change to say "Waiting for activation..." until Apple's servers verify your account. Once it says "Your phone number will be shared with people you call with FaceTime." the account is verified.

You can now use AppleID for credentials for devices that do not have SMS and an easily accessed/understood phone number. SMS is needed one time at activation to ensure Apple's push notification goes to the correct device - there shouldn't be a problem dropping SMS later once the device is registered.

This data lets the address book facilitate dialing and location over WiFi. Apple runs servers that let each device check in and request to initiate a call if the receiver is online anywhere. There is no technical reason why FaceTime cannot use cellular data for the call (bits are bits) but in practice the carriers would probably have to charge more for supporting everyone video chatting on networks that are currently straining to contain the data already flowing over them.

On devices that allow an email address - if someone calls you - all the devices currently on ring but only one picks up. For example, it's possible to receive incoming FaceTime calls ringing on a Mac, an iPod touch and an iPad - and any one can pick up the "call".