Cleaning brushes can be a pain but it will save you money to not have to buy brushes every time you have to paint.
Latex Paint
Wash immediately after painting with warm soapy water. Do not soak overnight. Comb and straighten bristles before storing.
Oil Paint
Clean immediately after painting using a solvent (paint thinner) or cleaner recommended by the manufacturer. Do not soak overnight. Comb and straighten bristles before storing.
If I am in a hurry and can’t clean the brushes I wrap them tightly in a plastic bag and place it in the freezer. This prevents the paint from drying out before I have to use it again.