Assuming you are not using your own module, you should create a local layout file at location app/design/frontend/[package]/[theme]/layout/local.xml and assuming you are seeing the compare block which is added by default you should add the following into the file