Puzzled

Tonight, while me and my friend was texting each other to meet up a text message came from his phone 'Who is this? I had arrived where we were meeting, and I was sitting across from him now. So, we had stopped texting each other. The texting continued even after he turned his phone off. The texter said his name was the same name. The texter texting me from his phone number while he has his phone in his hand, and it was powered off. Can someone explain this?
Sure. Someone had an iPhone or iPad and was signed in iCloud and the Messages app with the same Apple ID as your “friend”.
If those messages are traditional SMS/MMS messages, it’s possible for a third-party to set the issuing number to anything and send the message. In four words, spoofing the phone number.

There’s very little you can do about those, beside reporting the situation to your friend’s and your mobile carrier.
Did you answer the person, and ask who they were? Could it have been an auto answer enabled by mistake?

Original thread: https://forums.imore.com/threads/puzzled.463486/