For chains, they are universal between brands, but different saws can use different sizes (within the same brand or otherwise). The two chain parameters that cannot be changed are pitch and gauge. Pitch is how "long" the links are, with the most common being 3/8" and .325" (the latter generally only on smaller saws and shorter bars). 3/8" low profile is sometimes on especially small saws like top handles, and .404" is sometimes used on the very largest saws (though nowadays, even those tend to be 3/8). In the old days of big, low rpm saws there was stuff like 1/2" and 3/4" too. Gauge is how wide the the bottom of the drive links that rides in the bar groove is. That is usually going to be .050", .058", or .063", with .050" being most common.
Both of these parameters are what they are- if you want to use a chain with a different pitch than what the saw has, you need to change the drive sprocket on the saw (easy and inexpensive to do, as the sprockets are basically disposable wear items anyway) and possibly the bar if it is a sprocket tip. To change the gauge, you need to replace the bar (drive sprockets aren't gauge-specific).
The third parameter is the number of drive links, which is related to bar length. GENERALLY, the number of drivers is the same for a given pitch and bar length regardless of brand- 72t for 20", 84t for 24", etc. Sometimes this will differ by a link for a certain bar/saw/sprocket combination, though even then often you might be able to make it work using the adjustment available in the tensioning slot. It's easy enough to make chains shorter by having a shop take out however many links. Making it longer is possible I suppose, but I haven't really seen it- putting a new section of chain in a worn/loose/stretched old chain just seems like more trouble than it's worth.
The bars themselves are kind of a pain. Basically there is the Stihl pattern and the Husqvarna pattern. Pretty much everyone besides Stihl uses the Husky pattern, so bars are pretty interchangable between most modern non-Stihl saws. I think maybe Solo used a Stihl pattern when they were still selling saws, but that's about it. Stihl has larger diameter studs that are closer together, and there are some differences in the tensioner hole as well. There are adapters available to take up the extra space when using Stihl bars on Husky pattern saws, but there is still the issue of slot length and tensioner hole size. So it often requires some work on the bar with a Dremel or similar to make it work. Not really worth it for most people. The Stihl pattern uses bigger nuts for the bar mount (they use the big side on the wrench end of a scrench), Husky has smaller nuts with a more pronounced flange.