The compulsions are the actual actions you do in order to try to combat the obsessive thoughts. So let's say someone has the obsession that they'll be infected with germs. The compulsion would be to constantly wash your hands, keep your personal belongings clean and avoid possible places where you could possibly catch something.
When I was about 17, I used to believe I was gay. I cried all the time, but they were just thoughts. I never became gay.