This is WiFi calling and iMessage in action.
iMessage is a messaging service that is brokered through Apple's iCloud servers and delivers point to point messages to multiple devices instead of needing SMS to deliver a message to a mobile phone. This allows messages on macOS, iPad, iPod touch and Apple Watch to send and receive messages "from" and "to" mobile numbers.
WiFi calling is even better - it links the carrier directly to your Apple devices that are not your iPhone. It is basically a VOIP bridge from the iCloud authenticated devices to a gateway server that bridges the call to the telephone network.
Make and receive Wi-Fi calls from another device
If your carrier supports Wi-Fi Calling on iCloud-connected devices,
you can also make and receive Wi-Fi calls on other devices. You can
use Wi-Fi Calling on these devices, even if your iPhone isn't on the
same Wi-Fi Network or turned on:
- iPad or iPod touch with iOS 9 or later
- Apple Watch with watchOS 2 or later
- Mac (2012 or later model) with OS X El Capitan
Wi-Fi Calling isn't available on Mac Pro (Mid 2012).
Make sure that you're signed in to iCloud and FaceTime with the same
Apple ID that you use on your iPhone. Also make sure that your devices
have the latest software.
Apple Support - Make a call with Wi-Fi Calling
Pretty amazing time to be alive — our phone calls, video conferences and messages are now bits to be sent and received as digital data streams.