Elastic Compute Cloud or EC2 for short, is basically a virtual server that helps you run numerous 'in-guest' applications within a guest operating system (like linux or windows server) on the AWS cloud infrastructure.
It allows AWS subscribers/customers to run and build applications in a on-demand computing environment that is capable of serving an unlimited set of virtual machines (within budget 😵💫).
EC2 was one of AWS's first releases, before EC2, VMWare was (and probably still is) the most used platforms (hypervisor) for running virtual servers with in-guest applications. Before AWS EC2 nearly all virtual servers were hosted on in private data centres.
AWS enabled virtual server hosting on public Cloud meaning anyone with a credit card could create a new AWS account and start building, not data centre needed 😂 from zero to millions of customers with no building or server racks needed 😆
Once you understand EC2 you begin to figure that actually, everything in AWS is EC2/Instance backed. Serverless, Microservices, Containers, PaaS, all of it! So it's fair to say, no EC2, no AWS!
So when you get beyond virtual machines and run that little Lambda node js function one day, understand that it's running on a Linux EC2 virtual machine (we usually call them instances) - you can't see the EC2 instance because it isn't in your AWS account.