Mixing hair care products is generally safe as long as you aren't mixing certain chemicals.
These chemicals are in products like perms, relaxers, hair color, peroxide and other chemical enhancement products.These products need to be applied strictly according to manufacturers directions.
Otherwise products like shampoo and conditioner are perfectly safe to mix and match.In fact you may even achieve better results by mixing and matching until you find your perfect combination.Combining your shampoo and conditioner and applying them at the same time can cause you to loose the effectiveness of the conditioner.But you can use XX shampoo and then use YY conditioner and get great results.
The exception to this rule is medicated shampoo and conditioner.If you are using a medicated product that contains an ingredient like pyrithicone zinc for dandruff or other scalp conditions it is ideal that you use the full product line.While there is no danger in mixing products like these with other shampoo/conditioner you may find you loose some of the effectiveness of the medication.If you have to choose either shampoo or conditioner, choose the medicated conditioner.This keeps you from washing away the benefits of the product through a second rinsing.You can even use a different conditioner on your ends and your medicated product on your roots and scalp.
Mixing styling products is fine as well.Some products however just will not mix leaving you with a globby or watery mess. To avoid this problem, read the ingredients list. Products that list water as a main ingredient will mix well with other products that have water as an ingredient.Products without water will not mix with products that contain water. Products with water contain emulsifiers to bind the ingredients.Without these emulsifiers weird globby messes can occur.Common bad mixtures of this sort are shine serums and gels. Gels and conditioning styling creams don't mix too well either.The conditioning agents in the styling creams contain ingredients that can interact with gels and you loose the effectiveness of both products.Hair sprays that are designed for finishing dry hair will not interact with products you put into your hair when it is wet so no worries there.
The best way to check and see if you can mix 2 products effectively is to combine the products in your hand and see if something weird happens.If you see products breaking down and separating into liquid and lumps then it is best to avoid mixing those on your hair as well.