Question: How does the computer remember the time even when it is switched off? 

Answer: There is a CMOS battery, like the kind in a watch just a lil bigger, that's on the motherboard.
This question from the Yahoo Q&A forum is categorized in the topic: Family & Relationships