For oil paint, first clean with turpentine and then soap. For acrylic paint, always keep the brush wet while painting (if not in use, let it sit immersed in water) and immediately after use rise with water thoroughly. While your brushes are still wet after cleaning, be sure to shape them so they'll try to their normal shape rather than frayed.