TrackMania Nations Forever required a player key to access online play, and that requirement is the source of most confusion for anyone installing it today. The key was free, but it did have to be requested.
Players registered on Nadeo's TrackMania site and were issued a key, which was then entered at the login prompt to unlock online ranking and multiplayer. Offline play and the built-in tracks worked without it, which is why some players never noticed the restriction.
Nadeo's original registration and key-issuing systems were retired years ago, and the game is now distributed as freeware through Ubisoft's channels without a key requirement. Anyone offering to sell you a "Nations Forever key" is selling something the publisher no longer charges for.
The game is a lightweight title by modern standards and still runs on current Windows builds with a little patience around compatibility settings. If your interest is the time-trial and track-building scene, the later TrackMania titles carry that torch with active communities.