How to send messages when a customer is registered

If you’re talking about WordPress user registration, you want to start by reading about the User Register hook: https://codex.wordpress.org/Plugin_API/Action_Reference/user_register

Then your code would be something like this which will automatically fire each time a user registers on the site:

add_action('user_register','send_sms');

function send_sms($user_id){
  // Code for your SMS API Here
}

The code would go in a plugin or in your Theme’s functions.php file.
If you’re talking about an ecommerce plugin, you need to see what action hooks they have available for customer registration and use that as per the developer documentation.