Web-spinning spiders obviously remain motionless while they are waiting for something to land in their web. Moving around wastes energy and draws attention to the spider, which makes it more likely to be eaten by birds, and makes flies less likely to get caught in the web.
Spinning a web is quite an energy-intensive process and a spider may have to wait days or weeks for a catch, so it is important to conserve as much energy as possible. Hunting spiders are much more active, but many of them are nocturnal predators and spend the day tucked away in a nest or under a rock - again, this is to conserve energy and avoid becoming prey.