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 each of the servers for your domain and subdomains -- 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 your desktop computer's
/etc/hosts file so that local requests will be routed to your staging server:
# Staging server IP address for my domain name