There are two answers to this, though they are related.
If you are just driving around and elect to enter a standard (non-Playlist) race, it will show you some of a few options. The first one is to use the car you are currently in (if permitted), it will show you what class that vehicle is considered. There are numerous classes, more on that in just a moment. The second is to select a different car. It then opens up your garage with all of the current permitted vehicles. The third is to select or create your own blueprint, or version of the race.
First option: not every race is available to every car type. When you enter your garage, you can select ‘Y’ to select which class/classes of car you wish to view. You will most of the different types there. There are a few classes not listed, they can be found in custom blueprints. When you select to run a race, the description of the race and what car type is in the “poster board” for the race. If you select that class, it will then show you only those cars in your garage that fit that class. It doesn’t matter what PI is of the car that you choose, it will approximately match that in the competing AI.
Second option: if it allows you to select a different class, then it will open up your garage to all classes available. Select which car you wish, it will then determine AI based on the class and PI that you selected. Unfortunately, if you have different tunes for the same car, you can only select the tune that is currently on that car, as far as I know. For instance, I have a Gremlin X that is done up with race tires, race suspension, and other mods tuned specifically for road use. I also have a tune for it with rally shocks, offroad tires, etc for running dirt and cross country. If I am trying to run a cross country event but my Gremlin is set to the race tune, I need to change it before the event.
Third option: if you do not see your car listed or want to select/create a custom blueprint, you click the third panel. You can now either search through blueprints other players have created…which may include the class you wish to run, or create one specifically for the class/car you want to run. Each panel in a custom blueprint will show what class is permitted. There are some different ones here than in your garage, for instance you can choose by decade, or special classes like Heavy Hitters, or by manufacturer.
Online/Playlist: when choosing a race featured in the current Playlist, the class has already been chosen for that event, as well as the PI class. Only those cars that fit those two requirements are shown. You can always tune a different PI into the the appropriate one, but you can’t change classes of cars. See the difference between related classes: rally, monster rally, classic rally, etc. There is also the option to enter the even as a normal event and not a Playlist event in which case you are back to the original three choices.
Hope this helps. Welcome aboard.