Reactions triggered in response to the presence of a tumor cell that act to protect the cell or organism.