Why does my unlocked iPhone runs Android instead of iOS?

My dad gifted me with unlocked iPhone that he originally purchased through TMobile. I didn't yet buy a sim for iPhone and I tested everything below through Wi-Fi. Whenever I hook up iPhone to laptop, iTunes doesn't recognize it at all, and I've noticed when I post my updates through Facebook, Facebook recognizes it as Android. What do I need to do to have iOS back and iTunes recognize my iPhone?

From the sounds of it you didn't get an iPhone at all. That's likely a clone. Looks like an iPhone but actually runs Android.

Looks like you got a fake IPhone. Many fake IPhones run on Android. Are you sure that your dad bought it through T-Mobile because if he did then you should definitely complain to T-Mobile about your fake IPhone.