What is the difference between linux and ubuntu?
This is a great "car and model" question. Linux is actually the kernel—the core part of the operating system that talks to the hardware. By itself, it's not very useful. An operating system like Ubuntu is what's called a "Linux distribution" (or distro). It takes the Linux kernel and packages it with a bunch of other software like a desktop environment (e.g., GNOME), a package manager, Firefox, LibreOffice, etc., to create a complete, usable system.
So, think of it like this: Linux is the engine, and Ubuntu is the entire car built around that engine. Other cars (distros) that use the same type of engine (Linux) include Fedora, Debian, and Mint.
To build on the car analogy, it's like Android and Samsung. Linux is the Android operating system (the core software). Ubuntu is a specific Samsung phone (like a Galaxy) that uses Android but adds its own apps, interface (One UI), and features. Just like there are many phones using Android, there are hundreds of "distros" using the Linux kernel, each with its own look, feel, and pre-installed software. Ubuntu is just the most popular one for beginners.