The term attract mode was also carried over to the Atari 8-bit computers such as the Atari XE (probably due to Atari's arcade past. In fact, it was an early version of a screensaver.
After a set amount of time (which could be changed by a poke) with no keyboard activity, the colours on the screen would be cycled between random colours. Pressing any key reset the colours back to what they should be. Quite simple but effective (if you subscribe to the view that screensavers are necessary at all). This happened at the Operating system level, and hence worked whether you were programmin or playing a game.
The counter could also be reset by a poke (memory location 77 rings a bell) within a program to stop the screensaver cutting in. This could be done at the risk of damaging the screen - or alternatively, it could be done if the program knows the screen has changed either due to whatever it's doing, or due to non-keyboard input such as the joystick, which wouldn't reset the screensaver counter.