When we consider species like the ones the question tells us about, we usually one faces an example of predation, since squirrel can behave as tertiary consumers for spiders, which are then secondary consumers. So the roles they develop in the environment can be named as population maintenance (especially for the squirrels, because they can control the wolf spider population, and spiders can allow them to continue their population growth).