First of all, install the configuration tool which lets you customize animations and everything to your hearts content.
Then, you can find that in System>Preferences>Advanced Desktop Effects Settings
sudo apt-get install compizconfig-settings-manager
Now, there are two ways to turn compiz on and off.
Right click on desktop. Select Change Desktop Background. Select the visual effects tab and you're there. Only problem is that when you use the GUI, you're going to get the default settings. To customize, just choose any on setting in the gui then use the configuration thing you just installed.
To turn compiz on via the command line, use this
To turn it off, use this
Hope that helps