When you buy a SSL certificate, it is not tied to any particular IP address. It can be used on any server that hosts the content for that domain name.
I personally have a load balancer on my website with multiple servers behind it. I have the same certificate installed on each of the web servers that are behind the load balancer. Each of those servers has its own IP address.
If you get a "wildcard" certificate, it can be used on your main domain name and your subdomains. The same certificate can be installed on all each of the servers for your domain -- typically one server (with a unique IP address) per subdomain.
There is no need to get new SSL certificates when you change your hosting provider. A SSL certificate can be migrated along with the rest of your site from one hosting provider to another. Your site will generally change IP address during this process, but the SSL doesn't need to change.
Your case of using one server as the main server and the second as the standby backup is perfectly acceptable. You can test your standby server by changing
/etc/hosts file so that your local desktop machine thinks that that server is the "live" one for your domain.