Currently, this is one of the greatest resources of cloud computing. Basically, you can define a base image, which is a state of an operational system such as Linux, and the cloud will create and destroy instances for you on demand. These instances can be created by the increase in computational resources, such as memory, CPU, network, or even based on custom rules. This is the key concern in order to have elasticity. If you want to learn more about Auto Scaling, check out https://aws.amazon.com/autoscaling/.
A note about automation
In order to use all these techniques and technologies at scale, we need to have full automation (https://en.wikipedia.org/wiki/List_of_build_automation_software) because it is impossible to handle all this with manual work. When we are using the cloud or containers, there is no other way around; everything needs to be automated. There are several tools that help us achieve this goal, such as Ansible (https://www.ansible.com/).
Don't forget about telemetry
When you have all infrastructures in place, you will also need to have monitoring, alerting, and proper dashboards. There are plenty of great tools for containers and public clouds, such as Sensu (https://sensuapp.org/) and Prometheus (https://prometheus.io/).