Complex sentence: As a coping mechanism she became the class clown when she was in school, so that she could make sure people "laughed with (her)" and not at her.
Split into simpler sentences: As a coping mechanism she became the class clown. That way she could make sure people "laughed with (her)" and not at her.