Why do we need to know both groundspeed and airspeed?
Airspeed is critical for pilots, because it is what the airplane "feels" when it's flying. Too little airspeed and the wings won't generate enough lift to fly, too much and the plane can be damaged. (And you're right, the pitot tube, along with the "static port" is what allows airspeed to be measured.)

Groundspeed is how quickly you're getting where you're going. This is also important, because the engine (or engines) consumes an certain amount of fuel per hour. If you are flying between two airports that are 400 miles apart in a plane that goes 100MPH, with no wind your trip will take 4 hours. If you have a 20MPH headwind your airspeed will still be 100MPH but your groundspeed will be reduced to 80MPH, and your trip will take 5 hours instead of 4. If you've only got 4.5 hours worth of fuel, you're going to need to make a stop. It's really good to know this before you leave!

So airspeed is how fast the plane is flying through the air and groundspeed is, as you observed, how fast you're getting where you're going. Both are important!