How to choose a compatible set of chain, cassette and chainring?
Bicycle chains are standardized. In general, cassettes, chains and chainrings are compatible with each other across manufacturers.

You just have to make sure you select a chain and chainrings that are compatible with the number of sprockets in the cassette. The number of rings on the crank does not matter.

(The difference is driven by the need for progressively closer spacing of the sprockets in the cassette as the number of sprockets increases. Chains for more speeds have to be narrower, which also affects chainring spacing and design.)

6, 7 and 8 speed systems all use the same chain width. Any manufacturers 6/7/8 speed chain will work for you. Similarly, any chainrings that fit your crank spider, and are designed for 6/7/8 speed systems will work. 

SRAM and Shimano use the same free-hub body 'HyperGlide' standard (introduced by Shimano) so their cassettes are interchangeable. Other manufacturers such as SunRace use this standard too. Just check that cassettes are specified as Shimano / SRAM compatible. 

A couple of notes. 


A cassette is technically a stack of sprockets that fits on a free-hub style wheel hub, where the freewheel mechanism is built into the hub. There is a older standard known as a free-wheel where the freewheel mechanism and sprockets come as one piece. If you have an older or inexpensive bike you should check which you have.
If you replace the cassette you must replace the chain, as a worn chain will very quickly wear out cassette sprockets. Chainrings wear slowest. It's worth inspecting all three as one or two may not need replacing.  
If you are thinking of larger chainrings or a cassette with a larger largest sprocket, you need to check if your rear derailleur can handle the increased difference between smallest and largest sprockets.