Your water heater is used each and every day, and most of the time, the water that it produces will be perfectly clear. However, after a while and due to some underlying problem with your water heater, it is possible that the hot water that comes out of your taps and other water fixtures is discolored in some way. Fortunately, different types of discoloration point to different issues: being able to identify what, exactly, is wrong with your water heater can help you provide valuable information to your water heater repair professional so the issue can be fixed as soon as possible.
Red and Orange
Dark red and orange hot water, especially if the colors edge more towards a brown shade, point to rust in your water heater or the pipes that are moving the hot water from your water heater to that fixture. You can tell which is to blame by turning the hot water in another sink: if the water still comes out orange or red, odds are your water heater's tank has started to rust, which means replacement is likely needed. If the water is clear, the issue is with the pipes leading to the previous tap specifically—which will still need to be replaced.
Green water points to corrosion in copper pipes. Copper is rust proof, so corrosion is instead associated with joining copper pipes together with steel or aluminum—and the pipe will begin to degrade from there. Corrosion of copper, just like rust in other types of pipes, will lead to leaks and water damage, so you should get in touch with a plumber immediately about replacing your pipes.
White flakes and particles swimming around in your hot water point to hard water. You will likely see a chalky buildup around the edges of your taps and faucets as well. Hard water is caused by calcium and magnesium in your water supply and is not harmful to drink but can clog your pipes and cause damage to appliances. You'll have to talk to a plumber about installing a water softener which will remove these minerals from your water supply before it has the chance to spread throughout your plumbing system.
Finally, though rare, you may see that the water coming out of your hot water tap is a deep black. This will only really happen if you haven't used your water heater in a significant period of time and points to mold growth within the tank. Black mold in your water is very unsafe to drink or be around, so you should avoid using your plumbing system at all until a professional has a chance to inspect it.