You can disable the Compare products functionality in Magento by following these steps:
1. Edit ./app/design/frontend/base/default/layout/local.xml (if you are using a different Magento theme, enter its name instead of default) and change the following code:
<remove name="catalog.compare.sidebar" />
2. Flush the Magento cache from your Magento admin area > System > Cache Management.