Are Shimano components compatible with each other? Do I have to get a specific chain? My cycling maintenance experience goes as far as changing tyres, but winter has been cruel and I need to replace some components.

Setup:


Cassette is a Shimano 105 CS-5700
Front chainring : Shimano Ultegra SG-X 53B
Chain : Not sure, all I can see is "shimano","VIA", "HG","JG" on the
sides. It's at 0.5% stretch.


Can I just get any 10 speed chain, or do I have to get a 105 or ultegra chain? Does it matter if I have a mixture of 105/ultegra components?
As long as you use a ten speed chain it shouldn't matter which group you take it from. Normally the higher priced ones are bit lighter but the additional price often does by far not match the lower weight. Also the higher priced ones might last not that long due to the lighter material.

Therefore if it's for a bike where you know that it will see some dirt and wear, better get some mid-priced stuff. It might last longer and if doesn't it won't drill as big a hole into your budget.