Twilio allows software developers to programmatically make and receive phone calls and send and receive text messages using its web service APIs
To get started you need to Sing Up. Visit the official site Twilio — https://www.twilio.com/ and click to Get a Free API Key
complete registration form
confirm your phone number
and get your first twilio phone number
Now you can go to the page Get Started with SMS and to practice.
If before sending SMS you will get a Error - 21408 “Permission to send an SMS has not been enabled for the region indicated by the ‘To’ number”. Just click on the following link https://www.twilio.com/user/account/settings/international/sms and apply the appropriate for you Geographic Permissions
Once you have finished with the Get Started with SMS and got your phone number, You can go to the console where you will get your Twilio Credentials https://www.twilio.com/console
Now you can use your credentials in the following code replacing the corresponding values as you want
server.js
install twilio package with npm install twilio
and run this code with node server.js