Device must be online

What is it that makes the device online, is it enough to have ‘mobile data’ turned on, or does the device have to be connected to the Internet, for the SMS commands to work.
Also, does the same go for the Wi-Fi , and the GPS.
Also, I don’t know what ‘categorize’ with a ‘label’ means, so excuse my ignorance.