Never rest brushes on their hairs. Always leave them flat or with the hairs upright. Keep brushes clean during the painting session and give them a thorough cleaning after the session. For water-based paints, switch back and forth between rinsing out with tap water and mildly soaped water. For oil and alkyd paints, use mineral spirits or turpentine in the same manner and finish up with mild soap or brush cleaner and water. Always reshape the brush when work is complete.
Here’s a tip for cleaning really big brushes often used in oil painting. Place an old wire colander in a gallon plastic ice cream bucket. Next, place both in a taller bucket with a lid. Fill the gallon bucket with paint thinner to cover the bristles. Swirl the brushes against the colander and then wipe off the excess with a rag. The big bucket catches any splashes.
Remember that solvents are toxic and should be disposed of as hazardous wastes.