You have probably experienced water temperature change while being in the shower and the temperature getting cold or suddenly too hot when someone flushes a toilet or turns on a faucet.
The Truck & Branch
Many people have a trunk and branch plumbing configuration. A large pipe runs the length of your building with smaller pipes coming off of this main pipe to each room that has plumbing fixtures. So if any of these fixtures, for example your toilet, are used they will demand water making less available to the other branches in the system. When flushing a toilet it uses cold water only which diverts cold water away from the shower as it fills the toilets water tank. The amount of cold water being taken out of the mix will cause the water temperature to go up possibly scalding you or at the very least making you feel very uncomfortable.
What You Can Do
There are a number of steps you can take to reduce or get rid of this problem. The cheapest option would be to reduce the amount of water flowing into your toilets water tank. To do this all you need to do is to turn the supply valve slightly in the off direction. This will of course mean that it will take your toilet longer to fill up and it may make it nosier when refilling, but it will reduce the amount of cold being taken away from your water mix in the shower and make it less likely that you will be scalded. Another option would be to reduce the amount of water your toilet will need by having your plumber install a low flow toilet, this also has the advantage of reducing your water bill.
You can also have your plumber install a new thermostatic mixing valve in the shower this helps to balance the amount of hot and cold water reaching the shower, so can reduce or even remove the temperature fluctuation problem.
Still Have A Problem About Why Does Water Temperature Change While Showering?
Making more water available to the system can also help with temperature fluctuations but this will require a major change to your existing plumbing by replacing the trunk and/or branch pipes with larger pipes. The most effective but also the one requiring the biggest upheaval of your plumbing would be to install a manifold to control the water through individual pipes running to each appliance. This would involve replacing most of the plumbing should would be the most expensive solution.