The basic difference between obsession and compulsion is

Actually there is no difference between the two disorders.

The former is diagnosed along with the Axis III of DSM-IV whereas the later is diagnosed along with Axis II of DSM-IV

THe former is a mood disorder whereas the later is an anxiety disorder.

The former involves preoccupation with certain throughts while the later involves preoccupation of certain actions