Setup is a configuration program found in every PC, which is burned on ROM (which in turn is placed in the motherboard). Usually, to call the setup you must press Del key during memory counting.
PC configuration is stored in a special memory called configuration memory. As this memory is built with CMOS technology, most guys refer to it just as CMOS memory. As this is a RAM type memory, its data are erased when PC is turned off. To avoid that, there is a battery that holds power to it, such that stored data won't be lost when mains is turned off. This battery is also responsible for powering the PC real time clock (RTC) circuitry for the same reason. Every PC has this clock built in and that's what keeps date and time updated.
In setup we alter the parameters stored in configuration memory, as shown in the picture. There is a general misconception about setup operation, though. As it is stored in PC's ROM memory, many guys think that setup and BIOS are just the same thing, which is not true. Inside ROM three different programs are stored (actually burned). The Basic Input and Output System (BIOS) that is responsible for teaching the main processor how to deal with basic devices, such as floppy unit, hard disk or video in text mode; the Power On Self Test (POST) which is the program in charge of the self test that is executed every time PC is powered up (like memory counting, for instance); and the Setup which is the program that allows the alteration of the parameters stored in the configuration memory (CMOS).
Another common misconception is to think that the configuration altered by setup program is stored in BIOS. As BIOS is a ROM type memory, it just can't allow its data to be altered. All information handled and altered by setup are stored solely in the configuration memory (CMOS).
Therefore when we run setup we don't enter BIOS nor do we alter BIOS values, as some guys say it by mistake. Actually we enter in setup and alter the values in the configuration memory.
Figure 1: Motherboard ROM memory chip. BIOS, POST and Setup softwares are written in this chip.
Figure 2: Example of a south bridge chip. The CMOS memory and the Real Time Clock (RTC) are both embedded in this chip nowadays.
Figure 3: This battery is connected to the south bridge chip, to power both CMOS memory and RTC circuits.