Time Switches are digital switches that incorporate a built-in clock (the clock acts as a timer). There are two types of Electronic Timed Switches, the first are built in units that can not be removed (these are often designed for use with a particular item). The second is a switch that plugs into a plug socket on the wall and can control the device that is plugged into the socket next to it.
The switches physical arrangement allows the device that is connected or the device(s) to receive power automatically for a length of time. There’s also a variation for this (the timer switch), this one actually lets you pick the time you want it to go off and on, it can all be set by you (you use the timer on the switch to select how long you desire the connected devices to have power for.
If you want to know how relays work and a few of their applications click at http://www.hirelay.com/.
The timed version is available in two different types (Completely electronic or Mechanical), the mechanical versions use a circular dial that should be turned around to the time you want, once the wheel turns past a specified place the mechanism will click into place and either switch the device on or off. The digital ones are electronic, you set the clock to the time you would like and allow the Digital Timed Switch do the rest of the work.