My iPhone texted without sim card, only wifi enabled, sim card in other phone in use?

I was texting using my Android phone that has the Sim Card in it for my phone number. My old iphone did not have a sim card in it and was not used when i added a friend's phone number that HAS a iphone themselves. I never got a text back from my friend but when I looked at my iphone it was on there instead. ... show more I was texting using my Android phone that has the Sim Card in it for my phone number. My old iphone did not have a sim card in it and was not used when i added a friend's phone number that HAS a iphone themselves. I never got a text back from my friend but when I looked at my iphone it was on there instead. How is it possible if I used my Android to text my friend that their reply would show up on a iphone that is not in use? I thought the sim card was where the phone number is identified. Any answers are welcome, I want to make sure I don't have a problem with lost communication because of having both devices. I use the iphone as a ipod and turn on the wifi for apps. I do not have a texting app at all and my android is the phone that uses my phone number through the sim card.
Update: Also wanted to mention that I did try to text another contact using the iphone but it did not work since theirs was not iphone. Yet when I replied to the message of my iphone friend it did go through. Did the new update of the iphone enable a network between iphones without cell tower service and only wifi? But... show more Also wanted to mention that I did try to text another contact using the iphone but it did not work since theirs was not iphone. Yet when I replied to the message of my iphone friend it did go through. Did the new update of the iphone enable a network between iphones without cell tower service and only wifi? But even so I never let my friend know that I had an iphone so there was no contact between the two phones, only a text from my android that she replied to but it went to my iphone instead of my sim card phone!
2 answers 2