There are special products for cleaning makeup brushes (which may be worth the investment if you’ve invested in very expensive sable brushes) but in a pinch you can just use warm, soapy water and a gentle shampoo or anti bacterial soap. Lipstick brushes may need more frequent and thorough cleaning since the lipstick tends to stick to the bristles.
After rinsing off the soap or shampoo, gently push the bristles back into shape and squeeze of excess water. Leave to dry on a towel. Don’t let them stand on their tips since the water will seep into the handle and weaken the glue, which will make the bristles warp or shed.