It is permitted to start a process before the Sabbath that will continue by itself on the Sabbath, even if this causes work to be done on the Sabbath, unless there are grounds for suspecting that someone will interfere with the process on the Sabbath, or unless the process is noisy and those who hear it may not know that it was started before the Sabbath (252:1,5). For example, if a person lights a fire, and it is not certain before the Sabbath that the fire will spread to all of the fuel, it is forbidden to derive benefit from the fire on the Sabbath (255:1-3). It is also sometimes permitted to begin a journey before the Sabbath even if it will unavoidably have to be continued on the Sabbath (see 248:1-4).
It is permitted to leave food on a stove before the Sabbath if there are no grounds for suspecting that the fire may be adjusted on the Sabbath; for example, it is permitted if the food is already fully cooked, or if the fire has been removed or covered, or if the food is next to the stove rather than on it (253:1;254:8-9). When leaving food on a stove is forbidden, if it was left deliberately, it must not be eaten until after the Sabbath, but if it was left accidentally, or by a non-Jew, it is permitted provided it was already fully cooked (see 253:1,5). On replacing food after removing it from the stove on the Sabbath see 253:2-3. On adding hot water to food on the stove see 253:4; on warming (or keeping warm) food on top of a pot on the stove or next to the stove see 253:5;258:1;318:6-8; on food that is being roasted or baked rather than cooked see 254:1-7.
It is forbidden to cover food or a pot on the Sabbath to keep it warm, even with something that does not add heat to it (253:5;257:1), but it is permitted to cover it to protect it (257:2), or to re-cover it if it becomes uncovered, or to add covers to it (257:4), or to cover food after transferring it to another pot (257:5), or if it is cold (257:6). Covering is forbidden even if the food is fully cooked (257:2,7), but it is permitted if the cover does not touch the pot (257:8). A person should cover food before the Sabbath to keep it warm so that he can eat warm food on the Sabbath (257:8); but it is forbidden to cover the food with something that adds heat to it (257:1; 253:1). For examples of things that do and do not add heat see 257:3. On covering food before the Sabbath with things that are not allowed to be moved on the Sabbath, and on sealing and unsealing the covering, see 259:1-7.
A person should not take anything out of his home shortly before the Sabbath if he may forget that he has it with him, and he should check to make sure he is not taking anything inadvertently (252:6-7). On rules about what a person should do with things in his possession if he is unexpectedly caught away from home when the Sabbath arrives see 266:1-12; on what he should do if he deliberately left home just before the Sabbath or finds something on the Sabbath see 266:8 and 266:13.
Shulchan Aruch, Copyright (c) 2000 Project Genesis, Inc.