Of course, fires do not always occur in buildings. Actually, most things that we have around us can burn, if the temperature is high enough.
How these things burn is still mainly determined by characteristics of the fuel and available amount of air. Consequently, a fire in a car that starts inside the passagenger compartment will in the early stages develop fairly similar to a fire in a room. The main difference is the geometry of the compartment: it’s smaller so that the fire will develop fire and, if the windows are closed, the fire will become ventilation controlled much faster.
However, most car fires starts in the engine compartment or outside of the car (if, for example, there’s a spillage of fuel). It might then spread into the passenger compartment from the outside. In addition, extinguishing a car fire might be fairly hard because the metal gets heated and might require a lot of cooling. Usually, there are also a lot of cavities in a car which also makes a fire harder to put out – it’s hard to reach fuel surfaces.
Again, most things can burn. But, it’s still characteristics of the fuel in combination with available air that determines how the fire will develop. And, of course, the geometry of the object or enclosure.