In the case of cars, if an automaker made the stereo or made the tires or whatever themselves, then they would be competing in that market. However, most automakers buy a number of parts/components like these from other companies e.g., tires from Goodyear, Firestone, Michelin, etc.
The market a company competes in is typically defined by some sort of final end product (like a smartphone, car, etc.) but can also be separately defined by individual parts/components like an OS, tires, etc. Apple competes in the smartphone market because they make the end product (iPhone) but they also compete in the mobile OS market because they make the mobile OS (iOS). Toyota competes in the car market because they make the end product (Avalon, Camry, etc.) but they don't compete in the tire market because they don't make the tires.
Apple is a MAJOR competitor in mobile OS which is an integral component of smartphones where they also compete.