Mostly, the different designations are there to encourage whole component group sales. As a general rule (not an absolute one), you can mix and match derailleurs and chainrings with other parts, but only with a one speed difference and with the other parts being the lesser speed.
In other words, 8 speed chain, shifter, and cassette (these three must match except for 6-8 speeds) are ok with 9 speed elsewhere, but not 10.
Realize that there is usually a difference in chain width, so there are potential exceptions to this rule.