What if you fly your own personal plane to a small private airport in the countryside that has no public transportation? I imagine that most pilots don't have a car parked at each private airport they intend on flying to. That is, of course, unless your car is small enough to fit inside your plane. If you want to go somewhere twenty miles from the airport, for example, do you just call a taxi or ask a friend in that town to pick you up in their car?
A pilot I know used to own a folding motorcycle for such purposes; when stowed it was about the size/weight of a large suitcase and I'm fairly sure (this was 30 years ago) it would fit through the luggage hatch of his Cessna 172. It could carry two people but at 49cc, and a two stroke engine at that, it was certainly a leisurely and perhaps fragrant way to travel. Being classed as a small motorcycle/moped there were a different set of licensing rules applicable that meant one didn't have to have the class of driving license as would be required for a larger engine
On occasions where there was a need to transport more people they were usually going to a place where one person could use it to retrieve a larger vehicle from somewhere at the destination, though a couple of times there was a bit of shuttling to do, one pillion passenger at a time
It seems they're still around and look to have modern, luxury facilities, such as lights and mud flaps, compared to the one I remember:
You do whatever you can.
Sometimes you call a taxi/Uber, sometimes you walk, sometimes you pack a small folding bicycle into your plane, and sometimes you borrow the airport car.
Many small airports in the US have a car (often a retired police car) available for itinerant pilots to borrow. It's usually a scary rusted out pile of junk, but it works. If you borrow it you're expected to return it promptly & with a full tank of gas.
It's wise to make arrangements for ground transportation before you arrive - there's no guarantee that any particular option (except walking) is going to be convenient and available.
In my experience, in the United States, most General Aviation airports, GA sections of the airport, and Fixed Based Operators have one to a fleet of courtesy crew cars. If you are a pilot being serviced by that particular facility, you are given access to a crew car. The length of time you can use the car can be anywhere from one to four hours, depending on the facility. The type of car can greatly vary as well. I have borrowed cars as nice as brand new Infiniti sedans, Chevy Suburbans, Tahoes, Toyota Camrys and Corollas to as crappy as the POS pictured below. Even at unattended airfields, there may be a car pilots can access through the local police department.
Check out the following...
CODE OF THE COURTESY CAR
COURTESY CAR FINDER
FBO COURTESY CARS
The best GA FBOs have even greater facilities than just a car. Many have crew-rest rooms, small theaters, meeting/briefing rooms, full crew kitchens, airport golf carts, and shower facilities. Some even have arraignments with local restaurants for them to provide transportation to and from the restaurant in nicer cars. Same with local hotels. The Class Bravo, Charlie and busier Class Delta Airports will have rental car agencies located in the FBO for overnight rentals. There are many apps and websites that give details of the amenities available at each participating FBO. ForeFlight is one of them that does an exceptional job.
The original poster is assuming that the majority of general aviation airports are accessed by public transportation. In the United States, there are even major Class Bravo airports without a substantial public transportation system. And, the systems that are there are predominantly not used as opposed to shuttles, taxis, and rideshare services. Unfortunately, the GA portions of the airports are located away from the commercial terminals. Therefore, there is not usually access to public transportation except for prearranged shuttles, taxis, and rideshare services.
No A/C and windows that were off their manual (not power) tracks...in Texas...in August.
But, we were thankful to have it so that we could run into town to get a bite to eat.
Typically the FBO's courtesy car is used, but I've flown into a lot of airports that either do not have an FBO (or the FBO does not have a courtesy car), or it was after hours and no one was around. Sometimes you might not even have cellular service in the remote airports and they won't have a landline phone in a public area. That's when you either start hiking or you are glad you brought a bike along with you. At my age, I'm not going to be doing much hiking... Even walking from one end of the runway to the other is going to kill my old knees. I can still ride a bike though and it will fit in the back of my plane. I fly a 4-seater, but no one ever occupies the other 3 seats, so I have room to put a bike. I have put 2 full size bikes in there once when my wife flew with me. I think I had to remove the front wheels though. These days though, with the electric scooters and such, that might be an option for some people.
Back before Hurricane Katrina, I was over at Lakefront airport in New Orleans and the FBO courtesy cars that they had at the FBO which had the military fueling contract were late model Jaguars. Sure, they were the 6-cylinder engines and this was when Ford owned Jag, so really they were just an overpriced Ford with a Jag nameplate, but that's still a lot more than you saw at other FBOs.