Indulging in having a lot of sex with different partners,specially when in a relationship or marriage, one fools around means being sexually unfaithful to their partner.
"He has been fooling around a lot lately behind her back!"
It could also mean being engaged in playful childish activities,telling jokes or being silly.