Quoting from the Gran Turismo FAQ:
What is the role of the host in an online race event?
Last Updated: Dec 24, 2007
In the online gameplay (Star type) of Gran Turismo 5
Prologue there is a host player.
The host has the following two roles:
(1) Manages the start and end of races.
(2) Performs the communication between all participant players for
internal data communications during gameplay.
Because of this, if the host exits out of a race during the race, the
race itself will be terminated. Also, please note that if the
connection environment of the host deteriorates, the cars on screen
may not drive properly.
For this reason, the software automatically evaluates the network
connection environments of the participant players, to select the
players with the most suitable network connection as the host.
The actual upstream bandwidth of the host is especially important
since they will be communicating with other players. Therefore the
software evaluates both the NAT type of the players, and the measured
connection speed during actual play as well.
Regarding evaluation of your network connection environment, please
refer to the following page.
I know this information covers the Prologue rather than GT5 itself, but I can't find any references to whether or not they changed the networking model between then and GT5. There is no other relevant FAQ entry for GT5, so I'm making the assumption that this information is still valid.
Based on this, it appears that the games are, indeed, hosted by one of the players and not on the PSN servers. If I'm reading this right, the game determines which player has the best connection as the time, so you shouldn't have to worry about it yourself. That said, having more people on a wired instead of wireless connection would help, since their bandwidth still matters for timely communication with other racers through the host.
According to this website:
Step 1: Log on to PSN (ON YOUR COMPUTER) for the respective region you wish to find the SKU for(in the US, for example, it's us.playstation.com).
Step 2: After that search for the game you want using the search bar on left side of the screen at the bottom of the buttons. After you have found the page of the game you are looking for, hit control + u to bring up source code of the page.
Step 3: Near the bottom of the source code, you should see something like this:
<meta name="hasTrailer" content=""/>
<meta name="gameRating" content="TEEN"/>
<meta name="partOfGame" content="Prince of Persia® Sands of Time HD"/>
<meta name="SKU-ID" content="NPUB-30303"/>
<meta name="last-modified" content="2010-12-27"/>
The second-last line of the source code is the SKU or game id of the game you were looking for (so for instance this would be NPUB30303).
Best Answer
It depends.
Each console generation uses different hardware, which behave differently. Code written for one hardware will not necessarily work for another. This is especially true for consoles, which usually make heavy changes to their hardware from one generation to the next, usually removing old, obsolete features that can be achieved differently.
Older PS models
As a general rule of thumb, an older console will not run games made for a newer console. So in your example, no, a PS2 will never run a PS4 game. It just doesn't have the hardware to do it (it's not like Sony had a time machine that allowed them to include PS4 hardware in a PS2).
The other way around is more complicated.
PS2
In the past, newer consoles shipped with hardware used in older consoles in order to provide backward compatibility. For example, the PS2 had PS1 hardware, with which it ran PS1 games.
PS3
The PS3 used to have PS2 hardware at first. Then, some of that hardware was removed to reduce cost. At that point, PS2 games had to be partially emulated to run on the PS3. Finally, the PS3 shipped without PS2 hardware. Sony eventually released an emulator that allowed some select few PS2 games to run on all PS3 models. These games could be bought for the PS3 on the PlayStation Network.
Fortunately, all PS3 models are compatible to PS1 games through the use of emulation.
PS4
The PS4 only plays PS4 games.
While you can play PS3 games on PS4 using a PS Now subscription, the games don't run on the PS4 itself. Instead, they run on some servers in the cloud. Input is streamed from the PS4 to those servers, and image and sound is streamed back from the servers to the PS4. This also works with other devices, such as a PC.
A few PS2 games are available on the PlayStation Network and can be played on the PS4 via emulation. The original PS2 discs are not compatible to the PS4, however.
PS5
The PS5 supports running PS4 games. According to pocket-lint.com, this is achieved through emulation:
There is currently no information on compatibility with PS3 or older games.
Emulation is a technique that translates code written for one machine, so it can run on another. Obviously, running a game through an emulator requires more power than running the game directly, hence why it's used exclusively by newer (more powerful) consoles to run games written for older (less powerful) ones. A PS2 could never hope to play PS4 games through emulation.